[FFmpeg-devel] [PATCH 4/4] lavf/wvdec: remove artificial restrictions on stream parameter changes

Anton Khirnov anton at khirnov.net
Sun Apr 5 23:32:41 EEST 2020


They are not forbidden by the specification.
---
 libavformat/wvdec.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/libavformat/wvdec.c b/libavformat/wvdec.c
index b9fc6a59f9..4159bf1253 100644
--- a/libavformat/wvdec.c
+++ b/libavformat/wvdec.c
@@ -208,24 +208,6 @@ static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb)
     if (!wc->rate)
         wc->rate   = rate * rate_x;
 
-    if (flags && bpp != wc->bpp) {
-        av_log(ctx, AV_LOG_ERROR,
-               "Bits per sample differ, this block: %i, header block: %i\n",
-               bpp, wc->bpp);
-        return AVERROR_INVALIDDATA;
-    }
-    if (flags && !wc->multichannel && chan != wc->chan) {
-        av_log(ctx, AV_LOG_ERROR,
-               "Channels differ, this block: %i, header block: %i\n",
-               chan, wc->chan);
-        return AVERROR_INVALIDDATA;
-    }
-    if (flags && rate != -1 && !(flags & WV_DSD) && rate * rate_x != wc->rate) {
-        av_log(ctx, AV_LOG_ERROR,
-               "Sampling rate differ, this block: %i, header block: %i\n",
-               rate * rate_x, wc->rate);
-        return AVERROR_INVALIDDATA;
-    }
     return 0;
 }
 
-- 
2.25.1



More information about the ffmpeg-devel mailing list