lavf: fix segfault in av_open_input_stream()
ic is NULL in case of error.
(cherry picked from commit 13551ad1e3)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
dc3ab8ca43
commit
44b3f05309
1 changed files with 2 additions and 1 deletions
|
|
@ -465,7 +465,8 @@ int av_open_input_stream(AVFormatContext **ic_ptr,
|
|||
else
|
||||
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_ptr = ic;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue