vlc | branch: master | Steve Lhomme <[email protected]> | Mon Oct 7 15:05:26 2019 +0200| [e810903970d8c228f9daa41bcb2357e42585a5be] | committer: Steve Lhomme
video_output: don't use the decoder FIFO if it has been deleted For example if the vout didn't start properly. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e810903970d8c228f9daa41bcb2357e42585a5be --- src/video_output/video_output.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index eb022fb2ac..21d55bc89c 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -223,6 +223,9 @@ void vout_GetResetStatistic(vout_thread_t *vout, unsigned *restrict displayed, bool vout_IsEmpty(vout_thread_t *vout) { assert(!vout->p->dummy); + if (!vout->p->decoder_fifo) + return true; + picture_t *picture = picture_fifo_Peek(vout->p->decoder_fifo); if (picture) picture_Release(picture); @@ -1596,7 +1599,10 @@ error: filter_chain_Delete(sys->filter.chain_static); video_format_Clean(&sys->filter.format); if (sys->decoder_fifo != NULL) + { picture_fifo_Delete(sys->decoder_fifo); + sys->decoder_fifo = NULL; + } return VLC_EGENERIC; } @@ -1706,7 +1712,10 @@ void vout_StopDisplay(vout_thread_t *vout) free(sys->filter.configuration); if (sys->decoder_fifo != NULL) + { picture_fifo_Delete(sys->decoder_fifo); + sys->decoder_fifo = NULL; + } assert(sys->decoder_pool == NULL); if (sys->mouse_event) _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
