Hi!
Attached patch improves ico probing, previously mpeg-2 frames could be
detected.
Please comment, Carl Eugen
diff --git a/libavformat/icodec.c b/libavformat/icodec.c
index 22e2099..c3e87ea 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
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel