]> git.sesse.net Git - ffmpeg/commitdiff
avformat: increase first_frames threshold for mp3,ac3
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>
Sat, 18 Jul 2015 02:09:48 +0000 (22:09 -0400)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 18 Jul 2015 02:52:49 +0000 (04:52 +0200)
Fixes Ticket4723

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/ac3dec.c
libavformat/mp3dec.c

index 58ef44d45a76218737cd88b4c4cc9e0052d20855..bef55cb6586415a04fc130ab513eb275ced1b513 100644 (file)
@@ -80,7 +80,7 @@ static int ac3_eac3_probe(AVProbeData *p, enum AVCodecID expected_codec_id)
     if(codec_id != expected_codec_id) return 0;
     // keep this in sync with mp3 probe, both need to avoid
     // issues with MPEG-files!
-    if   (first_frames>=4) return AVPROBE_SCORE_EXTENSION + 1;
+    if   (first_frames>=7) return AVPROBE_SCORE_EXTENSION + 1;
     else if(max_frames>200)return AVPROBE_SCORE_EXTENSION;
     else if(max_frames>=4) return AVPROBE_SCORE_EXTENSION/2;
     else if(max_frames>=1) return 1;
index 731dc6371dcbee211f728a9b5bc61436abef3d2f..20af7bce9d0f7f4e96a12bf3ef26933f5becbd17 100644 (file)
@@ -98,7 +98,7 @@ static int mp3_read_probe(AVProbeData *p)
     avcodec_free_context(&avctx);
     // keep this in sync with ac3 probe, both need to avoid
     // issues with MPEG-files!
-    if   (first_frames>=4) return AVPROBE_SCORE_EXTENSION + 1;
+    if   (first_frames>=7) return AVPROBE_SCORE_EXTENSION + 1;
     else if(max_frames>200)return AVPROBE_SCORE_EXTENSION;
     else if(max_frames>=4 && max_frames >= p->buf_size/10000) return AVPROBE_SCORE_EXTENSION / 2;
     else if(ff_id3v2_match(buf0, ID3v2_DEFAULT_MAGIC) && 2*ff_id3v2_tag_len(buf0) >= p->buf_size)