mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 16:52:31 +00:00
Fix av_open_input_stream with uninitialized context pointer.
Code would allocate a new context but forget to assign it to the pointer actually passed to avformat_open_input, potentially causing a crash. Even if it was initialized it would cause a memleak. This caused crashes with e.g. mpd, see also http://bugs.gentoo.org/show_bug.cgi?id=373423 Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
parent
3950376b8b
commit
4e59c8ecf1
@ -458,7 +458,7 @@ int av_open_input_stream(AVFormatContext **ic_ptr,
|
||||
opts = convert_format_parameters(ap);
|
||||
|
||||
if(!ap->prealloced_context)
|
||||
ic = avformat_alloc_context();
|
||||
*ic_ptr = ic = avformat_alloc_context();
|
||||
else
|
||||
ic = *ic_ptr;
|
||||
if (!ic) {
|
||||
|
Loading…
Reference in New Issue
Block a user