Opened 6 years ago
Closed 6 years ago
#7270 closed defect (fixed)
MIDI misdetected as amr
Reported by: | cgbug | Owned by: | |
---|---|---|---|
Priority: | important | Component: | avformat |
Version: | git-master | Keywords: | amr probe regression |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Outputs:
git-master: misdetects as amr
3.4.x: Invalid data found when processing input
3.3.x: Format libmodplug detected only with low score of 24, misdetection possible!
Decoding is correct with 3.3.x
Attachments (2)
Change History (7)
by , 6 years ago
Attachment: | not_amr.mid added |
---|
comment:1 by , 6 years ago
Keywords: | amr probe regression added |
---|---|
Priority: | normal → important |
comment:3 by , 6 years ago
Please test if this change fixes the issue for you:
diff --git a/libavformat/amr.c b/libavformat/amr.c index f954803..3abce27 100644 --- a/libavformat/amr.c +++ b/libavformat/amr.c @@ -201,8 +201,10 @@ static int amrnb_probe(AVProbeData *p) i++; } } - if (valid > 100 && valid > invalid) + if (valid > 100 && valid >> 4 > invalid) return AVPROBE_SCORE_EXTENSION / 2 + 1; + if (valid > 100 && valid > invalid) + return AVPROBE_SCORE_EXTENSION / 4; return 0; }
by , 6 years ago
Attachment: | not_amr2.mid added |
---|
comment:4 by , 6 years ago
Patch fixes first sample. Second sample works after disabling amrwb demuxer.
comment:5 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
For future tickets: Please always provide the command line you tested together with the complete, uncut console output.
Should be fixed in 40b7e6071815fc416a4efc5dc1616f5460a3aacb, thank you for the report!
Note:
See TracTickets
for help on using tickets.
Please test current FFmpeg git head, recompile with
--disable-demuxer=amrnb
and test if decoding works.