[FFmpeg-cvslog] lavd/pulse_audio_enc: add another default to stream name

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Oct 26 11:40:55 CEST 2013


On Sat, Oct 26, 2013 at 10:38:50AM +0200, Lukasz Marek wrote:
> ffmpeg | branch: master | Lukasz Marek <lukasz.m.luki at gmail.com> | Thu Oct 24 18:10:06 2013 +0200| [c6c70c2bf76cbec073c97f92dea2fe1fbcf6665c] | committer: Lukasz Marek
> 
> lavd/pulse_audio_enc: add another default to stream name
> 
> Signed-off-by: Lukasz Marek <lukasz.m.luki at gmail.com>
> 
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c6c70c2bf76cbec073c97f92dea2fe1fbcf6665c
> ---
> 
>  libavdevice/pulse_audio_enc.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/libavdevice/pulse_audio_enc.c b/libavdevice/pulse_audio_enc.c
> index 5343696..86ef648 100644
> --- a/libavdevice/pulse_audio_enc.c
> +++ b/libavdevice/pulse_audio_enc.c
> @@ -59,8 +59,12 @@ static av_cold int pulse_write_header(AVFormatContext *h)
>          return AVERROR(EINVAL);
>      }
>  
> -    if (!stream_name)
> -        stream_name = h->filename;
> +    if (!stream_name) {
> +        if (h->filename)
> +            stream_name = h->filename;
> +        else
> +            stream_name = "Playback";

May I suggest
stream_name = h->filename ? h->filename : "Playback";
It's a matter of taste, but I find if..else overly verbose here.


More information about the ffmpeg-cvslog mailing list