diff options
author | wm4 <wm4@nowhere> | 2018-05-19 14:41:06 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2018-05-24 19:56:35 +0200 |
commit | d33e5972b38c1a8d1ed2c19095a94c70c33881c3 (patch) | |
tree | 40b2ff985f51f53505ddd5985df4abe2ba97eced /demux/demux.h | |
parent | 562d8e6d3236022a77e49a17948e25e493538f04 (diff) | |
download | mpv-d33e5972b38c1a8d1ed2c19095a94c70c33881c3.tar.bz2 mpv-d33e5972b38c1a8d1ed2c19095a94c70c33881c3.tar.xz |
demux: get rid of free_demuxer[_and_stream]()
Them being separate is just dumb. Replace them with a single
demux_free() function, and free its stream by default. Not freeing the
stream is only needed in 1 special case (demux_disc.c), use a special
flag to not free the stream in this case.
Diffstat (limited to 'demux/demux.h')
-rw-r--r-- | demux/demux.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/demux/demux.h b/demux/demux.h index 25cefd115f..6a8a08d8df 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -177,6 +177,7 @@ struct demuxer_params { bool initial_readahead; bstr init_fragment; bool skip_lavf_probing; + bool does_not_own_stream; // if false, stream is free'd on demux_free() // -- demux_open_url() only int stream_flags; bool disable_cache; @@ -249,8 +250,7 @@ typedef struct { int aid, vid, sid; //audio, video and subtitle id } demux_program_t; -void free_demuxer(struct demuxer *demuxer); -void free_demuxer_and_stream(struct demuxer *demuxer); +void demux_free(struct demuxer *demuxer); void demux_add_packet(struct sh_stream *stream, demux_packet_t *dp); void demuxer_feed_caption(struct sh_stream *stream, demux_packet_t *dp); |