From 83f68f725d80b23f76c9a8cd8dbb8349b33c9779 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 19 Aug 2012 17:58:58 +0200 Subject: core, timeline: don't keep separate stream field The timeline code kept pairs of stream and demuxer references around. The reference to the stream is redundant, because it can be accessed through the demuxer. Simplify the code by removing the redundant stream reference. Also, set mpctx->stream to the current segment when using timeline. Fix a small memory leak in tl_matroska.c introduced earlier. --- mp_core.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'mp_core.h') diff --git a/mp_core.h b/mp_core.h index 6d19426295..645c626022 100644 --- a/mp_core.h +++ b/mp_core.h @@ -64,15 +64,10 @@ enum exit_reason { EXIT_ERROR }; -struct content_source { - struct stream *stream; - struct demuxer *demuxer; -}; - struct timeline_part { double start; double source_start; - struct content_source *source; + struct demuxer *source; }; struct chapter { @@ -104,7 +99,7 @@ typedef struct MPContext { // Return code to use with PT_QUIT int quit_player_rc; - struct content_source *sources; + struct demuxer **sources; int num_sources; struct timeline_part *timeline; int num_timeline_parts; -- cgit v1.2.3