summaryrefslogtreecommitdiffstats
path: root/core/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-11 19:17:51 +0200
committerwm4 <wm4@nowhere>2013-07-11 19:17:51 +0200
commit6ede485e4b2ea1093e84d8589a1c321fe8a8462a (patch)
tree83ae0b1b63c682b47bcba5a8c6607467adbd79b0 /core/command.c
parentfa74be880c27b350615f62dd4a0d6a32be56c60e (diff)
downloadmpv-6ede485e4b2ea1093e84d8589a1c321fe8a8462a.tar.bz2
mpv-6ede485e4b2ea1093e84d8589a1c321fe8a8462a.tar.xz
core: don't access demux_stream outside of demux.c, make it private
Generally remove all accesses to demux_stream from all the code, except inside of demux.c. Make it completely private to demux.c. This simplifies the code because it removes an extra concept. In demux.c it is reduced to a simple packet queue. There were other uses of demux_stream, but they were removed or are removed with this commit. Remove the extra "ds" argument to demux fill_buffer callback. It was used by demux_avi and the TV pseudo-demuxer only. Remove usage of d_video->last_pts from the no-correct-pts code. This field contains the last PTS retrieved after a packet that is not NOPTS. We can easily get this value manually because we read the packets ourselves. Reuse sh_video->last_pts to store the packet PTS values. It was used only by the correct-pts code before, and like d_video->last_pts, it is reset on seek. The behavior should be exactly the same.
Diffstat (limited to 'core/command.c')
-rw-r--r--core/command.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/core/command.c b/core/command.c
index 5a68a228bc..cba9ef5a9a 100644
--- a/core/command.c
+++ b/core/command.c
@@ -566,13 +566,11 @@ static int mp_property_angle(m_option_t *prop, int action, void *arg,
case M_PROPERTY_SET:
angle = demuxer_set_angle(demuxer, *(int *)arg);
if (angle >= 0) {
- struct sh_stream *sh_video = demuxer->video->gsh;
- if (sh_video)
- resync_video_stream(sh_video->video);
+ if (mpctx->sh_video)
+ resync_video_stream(mpctx->sh_video);
- struct sh_stream *sh_audio = demuxer->audio->gsh;
- if (sh_audio)
- resync_audio_stream(sh_audio->audio);
+ if (mpctx->sh_audio)
+ resync_audio_stream(mpctx->sh_audio);
}
return M_PROPERTY_OK;
case M_PROPERTY_GET_TYPE: {