diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2006-11-20 00:15:52 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2006-11-20 00:15:52 +0000 |
commit | 363c86ce66bcf896305c0604f3b24921d7c451f7 (patch) | |
tree | 3f8a65ccfba1d3cecf9a7ed3d77cb922f0a567b7 /libavformat/matroska.c | |
parent | a76920d843713fdae5baf648dbc79e8c94bb0a23 (diff) | |
download | ffmpeg-363c86ce66bcf896305c0604f3b24921d7c451f7.tar.gz |
matroska: properly handle real video extradata
Originally committed as revision 7128 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroska.c')
-rw-r--r-- | libavformat/matroska.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libavformat/matroska.c b/libavformat/matroska.c index 0f71b287bc..b7f27ec026 100644 --- a/libavformat/matroska.c +++ b/libavformat/matroska.c @@ -2193,6 +2193,7 @@ matroska_read_header (AVFormatContext *s, enum CodecID codec_id = CODEC_ID_NONE; uint8_t *extradata = NULL; int extradata_size = 0; + int extradata_offset = 0; track = matroska->tracks[i]; /* libavformat does not really support subtitles. @@ -2262,6 +2263,12 @@ matroska_read_header (AVFormatContext *s, } } + else if (codec_id == CODEC_ID_RV10 || codec_id == CODEC_ID_RV20 || + codec_id == CODEC_ID_RV30 || codec_id == CODEC_ID_RV40) { + extradata_offset = 26; + track->codec_priv_size -= extradata_offset; + } + if (codec_id == CODEC_ID_NONE) { av_log(matroska->ctx, AV_LOG_INFO, "Unknown/unsupported CodecID %s.\n", @@ -2290,7 +2297,7 @@ matroska_read_header (AVFormatContext *s, if(st->codec->extradata == NULL) return AVERROR_NOMEM; st->codec->extradata_size = track->codec_priv_size; - memcpy(st->codec->extradata, track->codec_priv, + memcpy(st->codec->extradata,track->codec_priv+extradata_offset, track->codec_priv_size); } |