[FFmpeg-devel] [PATCH v2] avformat/utils: Fixes misdetection of zYLx.wav

Carl Eugen Hoyos ceffmpeg at gmail.com
Thu Nov 7 07:35:12 EET 2019



> Am 07.11.2019 um 02:23 schrieb lance.lmwang at gmail.com:
> 
> From: Limin Wang <lance.lmwang at gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> ---
> libavformat/wavdec.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
> index 52194f54ef..109c931a22 100644
> --- a/libavformat/wavdec.c
> +++ b/libavformat/wavdec.c
> @@ -149,7 +149,8 @@ static int wav_probe(const AVProbeData *p)
> 
> static void handle_stream_probing(AVStream *st)
> {
> -    if (st->codecpar->codec_id == AV_CODEC_ID_PCM_S16LE) {
> +    if (st->codecpar->codec_id == AV_CODEC_ID_PCM_S16LE &&
> +        st->codecpar->sample_rate <= 0 && st->codecpar->channels <= 0) {

Doesn’t this break dca detection?

As said, you have to fix this issue in the mp3 probe function.

>         st->request_probe = AVPROBE_SCORE_EXTENSION;
>         st->probe_packets = FFMIN(st->probe_packets, 32);

Carl Eugen


More information about the ffmpeg-devel mailing list