summaryrefslogtreecommitdiffstats
path: root/demux/demux_mkv.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-08 01:26:13 +0200
committerwm4 <wm4@nowhere>2013-07-08 01:36:02 +0200
commit05ae5afd6249af9770eb1e55104fbd4f510c2342 (patch)
treeed527373fe42a37f24d4eb43a7a7721d7145fd38 /demux/demux_mkv.c
parent50808bab8db030acd07433e58465d1e71bca2269 (diff)
downloadmpv-05ae5afd6249af9770eb1e55104fbd4f510c2342.tar.bz2
mpv-05ae5afd6249af9770eb1e55104fbd4f510c2342.tar.xz
demux: remove separate arrays for audio/video/sub streams, simplify
These separate arrays were used by the old demuxers and are not needed anymore. We can simplify track switching as well. One interesting thing is that stream/tv.c (which is a demuxer) won't respect --no-audio anymore. It will probably work as expected, but it will still open an audio device etc. - this is because track selection is now always done with the runtime track switching mechanism. Maybe the TV code could be updated to do proper runtime switching, but I can't test this stuff.
Diffstat (limited to 'demux/demux_mkv.c')
-rw-r--r--demux/demux_mkv.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index 724bf6255b..b00c115ef2 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -1962,9 +1962,8 @@ static void handle_realvideo(demuxer_t *demuxer, mkv_track_t *track,
} else
dp->pts =
real_fix_timestamp(dp->buffer, timestamp,
- ((sh_video_t *) demuxer->video->sh)->bih->
- biCompression, &track->rv_kf_base,
- &track->rv_kf_pts, NULL);
+ demuxer->video->gsh->video->bih->biCompression,
+ &track->rv_kf_base, &track->rv_kf_pts, NULL);
dp->pos = demuxer->filepos;
dp->keyframe = keyframe;
@@ -2047,8 +2046,7 @@ static void handle_realaudio(demuxer_t *demuxer, mkv_track_t *track,
if (track->sub_packet_cnt == 0)
track->audio_filepos = demuxer->filepos;
if (++(track->sub_packet_cnt) == sph) {
- int apk_usize =
- ((sh_audio_t *) demuxer->audio->sh)->wf->nBlockAlign;
+ int apk_usize = demuxer->audio->gsh->audio->wf->nBlockAlign;
track->sub_packet_cnt = 0;
// Release all the audio packets
for (x = 0; x < sph * w / apk_usize; x++) {