From 3e7a05de52af0dc72bb6716f8b452c36011d7a46 Mon Sep 17 00:00:00 2001 From: Torsten Jager Date: Tue, 20 May 2014 18:05:25 +0200 Subject: ff_video_decoder: fix multithreading. --- src/combined/ffmpeg/ff_video_decoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index e328cee32..21fbcdcc0 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -2291,6 +2291,7 @@ static void ff_free_dr1_frames (ff_video_decoder_t *this, int all) { They will only be replaced when new ones arrive, and freed on codec close. They also have no AVCodec.flush () callback for manual freeing (that is, avcodec_flush_buffers () does nothing). + Even worse: multithreading seems to always do it like that... So lets tolerate this behaviour on plain stream seek. */ if (!all) { it = NULL; @@ -2299,7 +2300,7 @@ static void ff_free_dr1_frames (ff_video_decoder_t *this, int all) { frames++; if (!frames) return; - if (frames < 5) { + if (frames < 12) { xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "ffmpeg_video_dec: tolerating %d held DR1 frames.\n", frames); return; -- cgit v1.2.3