[FFmpeg-devel] [PATCH 4/4] avformat/img2dec: Fail probing when no data is yet available and the filename contains no number/glob patterns either.

Benoit Fouet benoit.fouet at free.fr
Fri Sep 12 10:20:41 CEST 2014


Hi,

----- Mail original -----
> Fixes Ticket3901
> 
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
>  libavformat/img2dec.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
> index 9f48c5d..a21429f 100644
> --- a/libavformat/img2dec.c
> +++ b/libavformat/img2dec.c
> @@ -162,6 +162,8 @@ static int img_read_probe(AVProbeData *p)
>              return AVPROBE_SCORE_MAX;
>          else if (is_glob(p->filename))
>              return AVPROBE_SCORE_MAX;
> +        else if (p->buf_size == 0)
> +            return 0;
>          else if (av_match_ext(p->filename, "raw") ||
>          av_match_ext(p->filename, "gif"))
>              return 5;
>          else
> 

LGTM

-- 
Ben


More information about the ffmpeg-devel mailing list