Commit 13551ad1 authored by Anton Khirnov's avatar Anton Khirnov

lavf: fix segfault in av_open_input_stream()

ic is NULL in case of error.
parent 575c38d7
...@@ -466,7 +466,8 @@ int av_open_input_stream(AVFormatContext **ic_ptr, ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment