The possibility of failure for other types of data is very low for
a single frame, so it should not be allowed to override the file
extension. There is a similar situation for raw ac3, but there is a
higher chance of failure so it is not as much of an issue there.
---
 libavformat/aacdec.c | 2 +-
 libavformat/mp3dec.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/aacdec.c b/libavformat/aacdec.c
index 8d87ce6..e972518 100644
--- a/libavformat/aacdec.c
+++ b/libavformat/aacdec.c
@@ -57,7 +57,7 @@ static int adts_aac_probe(AVProbeData *p)
     if   (first_frames>=3) return AVPROBE_SCORE_EXTENSION + 1;
     else if(max_frames>500)return AVPROBE_SCORE_EXTENSION;
     else if(max_frames>=3) return AVPROBE_SCORE_EXTENSION / 2;
-    else if(max_frames>=1) return 1;
+    else if(max_frames>=2) return 1;
     else                   return 0;
 }
 
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 5c263ed..e9b3880 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -96,7 +96,7 @@ static int mp3_read_probe(AVProbeData *p)
     }
     if      (max_frames >  500) return AVPROBE_SCORE_EXTENSION;
     else if (max_frames >= 4)   return AVPROBE_SCORE_EXTENSION / 2;
-    else if (max_frames >= 1)   return 1;
+    else if (max_frames >= 2)   return 1;
     else                        return 0;
 //mpegps_mp3_unrecognized_format.mpg has max_frames=3
 }
-- 
1.8.1.2

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to