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)
int buffer_size = 0;
int ret = 0;
if (!sys->output->is_enabled)
return VLC_EGENERIC;
buffer = mmal_queue_get(sys->output_pool->queue);
if (!buffer) {
msg_Warn(dec, "Failed to get new buffer");
ret = -1;
goto out;
return VLC_EGENERIC;
}
picture = decoder_NewPicture(dec);
......@@ -438,7 +440,6 @@ static int send_output_buffer(decoder_t *dec)
}
sys->output_in_transit++;
out:
return ret;
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