You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
lavf: fix segfault in av_open_input_stream()
ic is NULL in case of error.
This commit is contained in:
@@ -466,7 +466,8 @@ int av_open_input_stream(AVFormatContext **ic_ptr,
|
|||||||
else
|
else
|
||||||
ic->pb = pb;
|
ic->pb = pb;
|
||||||
|
|
||||||
err = avformat_open_input(&ic, filename, fmt, &opts);
|
if ((err = avformat_open_input(&ic, filename, fmt, &opts)) < 0)
|
||||||
|
goto fail;
|
||||||
ic->pb = ic->pb ? ic->pb : pb; // don't leak custom pb if it wasn't set above
|
ic->pb = ic->pb ? ic->pb : pb; // don't leak custom pb if it wasn't set above
|
||||||
|
|
||||||
*ic_ptr = ic;
|
*ic_ptr = ic;
|
||||||
|
Reference in New Issue
Block a user