mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-11 01:25:25 +00:00
ffplay: flush codec buffers before freeing filters
We do this to ensure that input_get_buffer is not called from a frame_worker_thread of a multithreaded decoder when we already freed the filters. Fixes occasional segfaults on video stream change. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
a687acbbf0
commit
c2e8691c07
1
ffplay.c
1
ffplay.c
@ -1915,6 +1915,7 @@ static int video_thread(void *arg)
|
|||||||
stream_toggle_pause(is);
|
stream_toggle_pause(is);
|
||||||
}
|
}
|
||||||
the_end:
|
the_end:
|
||||||
|
avcodec_flush_buffers(is->video_st->codec);
|
||||||
#if CONFIG_AVFILTER
|
#if CONFIG_AVFILTER
|
||||||
av_freep(&vfilters);
|
av_freep(&vfilters);
|
||||||
avfilter_graph_free(&graph);
|
avfilter_graph_free(&graph);
|
||||||
|
Loading…
Reference in New Issue
Block a user