aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/wvdec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-03-26 04:41:42 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-04-02 07:17:34 +0200
commit96bf6d61e2873bdb0d471fbbd1cf19a6d03ef040 (patch)
tree10226591e38cf722fd37436786bf61c83888d47e /libavformat/wvdec.c
parent048bc3fe31502e0fa5ba115cc91611a72c8fec2e (diff)
downloadffmpeg-96bf6d61e2873bdb0d471fbbd1cf19a6d03ef040.tar.gz
avformat/wvdec: Export version as extradata
It might be used by the Matroska muxer. This is also the reason why the FATE-tests for muxing WavPack into Matroska needed to be updated: They now write the correct version 4.07 and not 4.03 as before. Reviewed-by: David Bryant <david@wavpack.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/wvdec.c')
-rw-r--r--libavformat/wvdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/wvdec.c b/libavformat/wvdec.c
index e56a6932ad..b9fc6a59f9 100644
--- a/libavformat/wvdec.c
+++ b/libavformat/wvdec.c
@@ -250,6 +250,9 @@ static int wv_read_header(AVFormatContext *s)
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
+ if ((ret = ff_alloc_extradata(st->codecpar, 2)) < 0)
+ return ret;
+ AV_WL16(st->codecpar->extradata, wc->header.version);
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->codec_id = AV_CODEC_ID_WAVPACK;
st->codecpar->channels = wc->chan;