Commit de2115b5 authored by Julian Scheel's avatar Julian Scheel Committed by Jean-Baptiste Kempf

mmal/codec: Don't send buffers to disabled ports

If a port is not enabled sending any buffers to it will cause an error, so
just don't try it.
Signed-off-by: default avatarJulian Scheel <julian@jusst.de>
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 620303f6
...@@ -389,11 +389,13 @@ static int send_output_buffer(decoder_t *dec) ...@@ -389,11 +389,13 @@ static int send_output_buffer(decoder_t *dec)
int buffer_size = 0; int buffer_size = 0;
int ret = 0; int ret = 0;
if (!sys->output->is_enabled)
return VLC_EGENERIC;
buffer = mmal_queue_get(sys->output_pool->queue); buffer = mmal_queue_get(sys->output_pool->queue);
if (!buffer) { if (!buffer) {
msg_Warn(dec, "Failed to get new buffer"); msg_Warn(dec, "Failed to get new buffer");
ret = -1; return VLC_EGENERIC;
goto out;
} }
picture = decoder_NewPicture(dec); picture = decoder_NewPicture(dec);
...@@ -438,7 +440,6 @@ static int send_output_buffer(decoder_t *dec) ...@@ -438,7 +440,6 @@ static int send_output_buffer(decoder_t *dec)
} }
sys->output_in_transit++; sys->output_in_transit++;
out:
return ret; return ret;
err: err:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment