<html><head></head><body>This does not look right. If Flush really does what it's supposed to do, no other thread should be racing for the PTS.<br><br><div class="gmail_quote">Le 2 octobre 2019 13:05:40 GMT+03:00, "Hugo Beauzée-Luyssen" <hugo@beauzee.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail"><hr> modules/codec/avcodec/video.c | 8 ++++++++<br> 1 file changed, 8 insertions(+)<br><br>diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c<br>index d69abd7419..911fee2f8b 100644<br>--- a/modules/codec/avcodec/video.c<br>+++ b/modules/codec/avcodec/video.c<br>@@ -702,7 +702,10 @@ static void Flush( decoder_t *p_dec )<br>     decoder_sys_t *p_sys = p_dec->p_sys;<br>     AVCodecContext *p_context = p_sys->p_context;<br> <br>+    vlc_mutex_lock(&p_sys->lock);<br>     date_Set(&p_sys->pts, VLC_TICK_INVALID); /* To make sure we recover properly */<br>+    vlc_mutex_unlock(&p_sys->lock);<br>+<br>     p_sys->i_late_frames = 0;<br>     p_sys->framedrop = FRAMEDROP_NONE;<br>     cc_Flush( &p_sys->cc );<br>@@ -759,7 +762,9 @@ static block_t * filter_earlydropped_blocks( decoder_t *p_dec, block_t *block )<br>                             "dropping frame (computer too slow ?)",<br>                      p_sys->p_context->reordered_opaque - p_sys->i_last_output_frame );<br> <br>+            vlc_mutex_lock(&p_sys->lock);<br>             date_Set( &p_sys->pts, VLC_TICK_INVALID ); /* To make sure we recover properly */<br>+            vlc_mutex_unlock(&p_sys->lock);<br>             block_Release( block );<br>             p_sys->i_late_frames--;<br>             return NULL;<br>@@ -1339,7 +1344,10 @@ static int DecodeVideo( decoder_t *p_dec, block_t *p_block )<br>         p_sys->i_last_output_frame = -1;<br>         p_sys->framedrop = FRAMEDROP_NONE;<br> <br>+        vlc_mutex_lock(&p_sys->lock);<br>         date_Set( &p_sys->pts, VLC_TICK_INVALID ); /* To make sure we recover properly */<br>+        vlc_mutex_unlock(&p_sys->lock);<br>+<br>         cc_Flush( &p_sys->cc );<br> <br>         if( p_block->i_flags & BLOCK_FLAG_CORRUPTED )</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>