[vlc-commits] mmal/codec: flush: wait for input buffers
Julian Scheel
git at videolan.org
Thu Oct 19 11:38:33 CEST 2017
vlc | branch: master | Julian Scheel <julian at jusst.de> | Thu Oct 19 11:23:01 2017 +0200| [df86ffd3dd06670279f8d2a0f8c0e48d3f383be3] | committer: Jean-Baptiste Kempf
mmal/codec: flush: wait for input buffers
Wait for all input buffers to be returned when flushing.
Signed-off-by: Julian Scheel <julian at jusst.de>
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=df86ffd3dd06670279f8d2a0f8c0e48d3f383be3
---
modules/hw/mmal/codec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/hw/mmal/codec.c b/modules/hw/mmal/codec.c
index 88ae5e2e60..f8ffbdfeef 100644
--- a/modules/hw/mmal/codec.c
+++ b/modules/hw/mmal/codec.c
@@ -540,7 +540,8 @@ static void flush_decoder(decoder_t *dec)
mmal_port_flush(sys->output);
mmal_port_flush(sys->input);
- while (atomic_load(&sys->output_in_transit))
+ while (atomic_load(&sys->output_in_transit) ||
+ atomic_load(&sys->input_in_transit))
vlc_sem_wait(&sys->sem);
/* Free pictures which are decoded but have not yet been sent
More information about the vlc-commits
mailing list