[FFmpeg-devel] [PATCH] avfoundation: do not report an I/O error if devices are listed

Thilo Borgmann thilo.borgmann at mail.de
Sun Apr 26 20:37:53 CEST 2015


Am 26.04.15 um 12:59 schrieb Thomas Volkert:
> From: ThomasVolkert <thomas at homer-conferencing.com>
> 
> ---
>  libavdevice/avfoundation.m | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
> index 763e675..aa8e825 100644
> --- a/libavdevice/avfoundation.m
> +++ b/libavdevice/avfoundation.m
> @@ -708,7 +708,9 @@ static int avf_read_header(AVFormatContext *s)
>              int index  = [devices indexOfObject:device];
>              av_log(ctx, AV_LOG_INFO, "[%d] %s\n", index, name);
>          }
> -         goto fail;
> +
> +        [pool release];
> +        return 0;
>      }
>  
>      // parse input filename for video and audio device
> 

Have you checked that a call to destroy_context is not necessary in that
case? If it is not needed, please add another label and jump there
instead (three lines above the existing fail label). As is, this patch
introduces redundancy.

-Thilo


More information about the ffmpeg-devel mailing list