diff options
author | Niklas Haas <git@haasn.xyz> | 2018-11-11 10:42:41 +0100 |
---|---|---|
committer | Anton Kindestam <antonki@kth.se> | 2018-12-06 15:47:16 +0100 |
commit | 3dc2d7d7dd23f2a0fd2f23446f922e7e5ab1ed51 (patch) | |
tree | 96497616d94e3f00546fd858da63cd8331d33bd2 | |
parent | 32385a784c747997199d49cb15cffe455208564e (diff) | |
download | mpv-3dc2d7d7dd23f2a0fd2f23446f922e7e5ab1ed51.tar.bz2 mpv-3dc2d7d7dd23f2a0fd2f23446f922e7e5ab1ed51.tar.xz |
demux: fix memleak in allocation with params=NULL
The default behavior for `does not own stream` should be false, but this
condition is inverted so we need to default the base case to `true`.
-rw-r--r-- | demux/demux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux.c b/demux/demux.c index 0bcb059c79..27e8c73a91 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -2498,7 +2498,7 @@ struct demuxer *demux_open(struct stream *stream, struct demuxer_params *params, talloc_steal(demuxer, log); log = NULL; demuxer->in->owns_stream = - params ? !params->does_not_own_stream : false; + params ? !params->does_not_own_stream : true; goto done; } } |