[FFmpeg-cvslog] avformat/matroskadec: ignore CodecPrivate if the stream is VP9
James Almer
git at videolan.org
Tue Feb 20 03:13:48 EET 2018
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sat Jan 13 16:04:21 2018 -0300| [acdea9e7c56b74b05c56b4733acc855b959ba073] | committer: James Almer
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 at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=acdea9e7c56b74b05c56b4733acc855b959ba073
---
libavformat/matroskadec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index cda8df2213..edc4f5d476 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2397,6 +2397,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;
More information about the ffmpeg-cvslog
mailing list