Browse Source

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>
tags/n4.0
James Almer 7 years ago
parent
commit
acdea9e7c5
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavformat/matroskadec.c

+ 4
- 0
libavformat/matroskadec.c View File

@@ -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;



Loading…
Cancel
Save