Message ID | 2abad3ef.AUoAACIcJvIAAAAAAAAAALF60VUAARpcY_sAAAAAAAeRJgBgJaZe@mailjet.com |
---|---|
State | New |
Headers | show |
Series | mjpeg_mmal and avoid a frame copy in mmaldec | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index df14b9fc95..4dfaacbb41 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -711,9 +711,13 @@ static int ffmmal_read_frame(AVCodecContext *avctx, AVFrame *frame, int *got_fra goto done; } - ctx->eos_received |= !!(buffer->flags & MMAL_BUFFER_HEADER_FLAG_EOS); - if (ctx->eos_received) + int eos = !!(buffer->flags & MMAL_BUFFER_HEADER_FLAG_EOS); + if (eos) { + if (ctx->eos_sent) { + ctx->eos_received = 1; + } goto done; + } if (buffer->cmd == MMAL_EVENT_FORMAT_CHANGED) { MMAL_COMPONENT_T *decoder = ctx->decoder;