diff options
author | wm4 <wm4@nowhere> | 2012-08-19 17:58:58 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-09-07 16:06:36 +0200 |
commit | 83f68f725d80b23f76c9a8cd8dbb8349b33c9779 (patch) | |
tree | c970d25da1116141e1fdc9bfbf36132276240950 /mp_core.h | |
parent | c5e2120e15d3b6e6e896a48670376de985fcc712 (diff) | |
download | mpv-83f68f725d80b23f76c9a8cd8dbb8349b33c9779.tar.bz2 mpv-83f68f725d80b23f76c9a8cd8dbb8349b33c9779.tar.xz |
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.
Diffstat (limited to 'mp_core.h')
-rw-r--r-- | mp_core.h | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -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; |