aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2018-01-13 16:04:21 -0300
committerJames Almer <jamrial@gmail.com>2018-02-19 22:16:58 -0300
commit3fdff40a32e31b8bfe9127841f75472f20e30354 (patch)
tree2c55dd1a269ba6e1768c9e050e2dec0bdda38760
parent6a97ba521558ce131fe839eed2d51ff745280e1d (diff)
downloadffmpeg-3fdff40a32e31b8bfe9127841f75472f20e30354.tar.gz
avformat/matroskadec: ignore CodecPrivate if the stream is VP9
Defined in a recent revision of https://www.webmproject.org/docs/container/ This prevents storing the contents of CodecPrivate into extradata for a codec that doesn't need nor expect any. It will among other things prevent matroska specific binary data from being dumped onto other formats during remuxing. Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit acdea9e7c56b74b05c56b4733acc855b959ba073)
-rw-r--r--libavformat/matroskadec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index e6631097b8..95189525e3 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2390,6 +2390,10 @@ static int matroska_parse_tracks(AVFormatContext *s)
return ret;
} else if (codec_id == AV_CODEC_ID_PRORES && track->codec_priv.size == 4) {
fourcc = AV_RL32(track->codec_priv.data);
+ } else if (codec_id == AV_CODEC_ID_VP9 && track->codec_priv.size) {
+ /* we don't need any value stored in CodecPrivate.
+ make sure that it's not exported as extradata. */
+ track->codec_priv.size = 0;
}
track->codec_priv.size -= extradata_offset;