Hi! On Tuesday 12 January 2016 01:33:53 pm Carl Eugen Hoyos wrote: > > Attached patch improves ico probing, previously mpeg-2 frames could be > detected.
Wikipedia claims that planes can be 0, new patch attached. Carl Eugen
diff --git a/libavformat/icodec.c b/libavformat/icodec.c index 22e2099..4d6e6dc 100644 --- a/libavformat/icodec.c +++ b/libavformat/icodec.c @@ -44,8 +44,12 @@ typedef struct { static int probe(AVProbeData *p) { - if (AV_RL16(p->buf) == 0 && AV_RL16(p->buf + 2) == 1 && AV_RL16(p->buf + 4)) - return AVPROBE_SCORE_MAX / 4; + if ( AV_RL16(p->buf) == 0 + && AV_RL16(p->buf + 2) == 1 + && AV_RL16(p->buf + 4) + && !(AV_RL16(p->buf + 10) & ~1) + && !p->buf[13]) + return AVPROBE_SCORE_MAX / 4 + 1; return 0; }
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel