1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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.
This commit is contained in:
wm4 2015-11-10 13:47:01 +01:00
parent 8a024f6a43
commit dafe4cd29c

View File

@ -476,6 +476,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;