[vlc-commits] mmal/codec: Do not disable ports for flushing
Julian Scheel
git at videolan.org
Fri Jun 5 15:37:14 CEST 2015
vlc | branch: master | Julian Scheel <julian at jusst.de> | Wed Jun 3 09:50:29 2015 +0200| [5011389fe855b0371cedfdfda2e2ed9c46b87c40] | committer: Jean-Baptiste Kempf
mmal/codec: Do not disable ports for flushing
It is safe to flush enabled ports, so avoid unnecessary delays by disabling
and enabling the ports.
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=5011389fe855b0371cedfdfda2e2ed9c46b87c40
---
modules/hw/mmal/codec.c | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/modules/hw/mmal/codec.c b/modules/hw/mmal/codec.c
index dfe916a..ae03dec 100644
--- a/modules/hw/mmal/codec.c
+++ b/modules/hw/mmal/codec.c
@@ -491,33 +491,13 @@ static void fill_output_port(decoder_t *dec)
static int flush_decoder(decoder_t *dec)
{
decoder_sys_t *sys = dec->p_sys;
- MMAL_STATUS_T status;
int ret = 0;
msg_Dbg(dec, "Flushing decoder ports...");
- mmal_port_disable(sys->output);
- mmal_port_disable(sys->input);
mmal_port_flush(sys->output);
mmal_port_flush(sys->input);
msg_Dbg(dec, "Ports flushed, returning to normal operation");
- status = mmal_port_enable(sys->input, input_port_cb);
- if (status != MMAL_SUCCESS) {
- msg_Err(dec, "Failed to enable input port %s (status=%"PRIx32" %s)",
- sys->input->name, status, mmal_status_to_string(status));
- ret = VLC_EGENERIC;
- goto out;
- }
- msg_Dbg(dec, "Input enabled");
- status = mmal_port_enable(sys->output, output_port_cb);
- if (status != MMAL_SUCCESS) {
- msg_Err(dec, "Failed to enable output port %s (status=%"PRIx32" %s)",
- sys->output->name, status, mmal_status_to_string(status));
- ret = VLC_EGENERIC;
- goto out;
- }
- msg_Dbg(dec, "Output enabled");
-out:
return ret;
}
More information about the vlc-commits
mailing list