Commit c2e8691c authored by Marton Balint's avatar Marton Balint

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: 's avatarMarton Balint <cus@passwd.hu>
parent a687acbb
......@@ -1915,6 +1915,7 @@ static int video_thread(void *arg)
stream_toggle_pause(is);
}
the_end:
avcodec_flush_buffers(is->video_st->codec);
#if CONFIG_AVFILTER
av_freep(&vfilters);
avfilter_graph_free(&graph);
......
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