[FFmpeg-trac] #7270(avformat:new): MIDI misdetected as amr
FFmpeg
trac at avcodec.org
Thu Jun 21 20:29:46 EEST 2018
#7270: MIDI misdetected as amr
-------------------------------------+-------------------------------------
Reporter: cgbug | Owner:
Type: defect | Status: new
Priority: important | Component: avformat
Version: git-master | Resolution:
Keywords: amr probe | Blocked By:
regression | Reproduced by developer: 0
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by cehoyos):
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;
}
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7270#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list