Commit ce589940 authored by wm4's avatar wm4 Committed by Anton Khirnov

mmaldec: send only a single EOS packet on flushing

Fixes apparent mmal_port_disable() freezes in ffmmal_stop_decoder() when
calling ffmmal_decode() with flush semantics a large number of times in
a row.
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 46aaad78
......@@ -477,6 +477,8 @@ static int ffmmal_add_packet(AVCodecContext *avctx, AVPacket *avpkt,
if (!is_extradata)
ctx->packets_sent++;
} else {
if (ctx->eos_sent)
goto done;
if (!ctx->packets_sent) {
// Short-cut the flush logic to avoid upsetting MMAL.
ctx->eos_sent = 1;
......
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