diff options
author | wm4 <nfxjfg@googlemail.com> | 2015-11-10 13:47:01 +0100 |
---|---|---|
committer | wm4 <nfxjfg@googlemail.com> | 2015-11-10 13:47:37 +0100 |
commit | dafe4cd29cada351a2785433b24401fc602911c4 (patch) | |
tree | 1921b1f6b705b98d4449c91888507285c2b8f137 /libavcodec/mmaldec.c | |
parent | 8a024f6a43444a73a3cd8d70abedde426b4e1986 (diff) | |
download | ffmpeg-dafe4cd29cada351a2785433b24401fc602911c4.tar.gz |
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.
Diffstat (limited to 'libavcodec/mmaldec.c')
-rw-r--r-- | libavcodec/mmaldec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index d419096c9a..281071cc80 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -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; |