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

Michael Niedermayer michaelni at gmx.at
Fri Sep 12 19:03:18 CEST 2014


On Fri, Sep 12, 2014 at 10:20:41AM +0200, Benoit Fouet wrote:
> 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

applied

thanks

[...]

--
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140912/66c5b250/attachment.asc>


More information about the ffmpeg-devel mailing list