ffplay: fix mem leak when opening input or parsing options fail.
Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0b9a9e0e2c
commit
90c9b49405
5
ffplay.c
5
ffplay.c
@ -3169,8 +3169,9 @@ static int read_thread(void *arg)
|
|||||||
stream_component_close(is, is->video_stream);
|
stream_component_close(is, is->video_stream);
|
||||||
if (is->subtitle_stream >= 0)
|
if (is->subtitle_stream >= 0)
|
||||||
stream_component_close(is, is->subtitle_stream);
|
stream_component_close(is, is->subtitle_stream);
|
||||||
if (is->ic) {
|
if (ic) {
|
||||||
avformat_close_input(&is->ic);
|
avformat_close_input(&ic);
|
||||||
|
is->ic = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user