summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_mkv.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-05-26 08:32:40 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-05-26 08:32:40 +0300
commitaa07b6d578847a1dcbb6b95f7837919fe430ee30 (patch)
tree89ed33303881e26eef56d39cec3a98ffa44138ba /libmpdemux/demux_mkv.c
parent07e4261aa25b02826b7924b5595336ad78744d28 (diff)
downloadmpv-aa07b6d578847a1dcbb6b95f7837919fe430ee30.tar.bz2
mpv-aa07b6d578847a1dcbb6b95f7837919fe430ee30.tar.xz
demux_mkv: fix realvideo extradata handling
The code handling larger-than-minimum realvideo extradata sizes was complete nonsense. It tried to add the additional data to the exported track extradata by reading data from the input stream, which was completely bogus as this code is called long after the original Matroska track extradata information has been read. As a result the data read had nothing to do with correct values, and the read call messed up the stream position which likely broke further parsing of the file and caused complete playback failure. Change the code to instead copy any additional part at the end of input extradata to the end of output extradata. I believe this is the intended semantics, though I haven't verified it from any specs.
Diffstat (limited to 'libmpdemux/demux_mkv.c')
-rw-r--r--libmpdemux/demux_mkv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c
index c5e17ea43f..d946dca0c1 100644
--- a/libmpdemux/demux_mkv.c
+++ b/libmpdemux/demux_mkv.c
@@ -1229,8 +1229,7 @@ static int demux_mkv_open_video(demuxer_t *demuxer, mkv_track_t *track,
mmioFOURCC('R', 'V', track->codec_id[9], '0');
dst = (unsigned char *) (bih + 1);
// copy type1 and type2 info from rv properties
- memcpy(dst, src - 8, 8);
- stream_read(demuxer->stream, dst + 8, cnt);
+ memcpy(dst, src - 8, 8 + cnt);
track->realmedia = 1;
#ifdef CONFIG_QTX_CODECS