Message ID | 20190906135758.14768-1-matthieu.bouron@gmail.com |
---|---|
State | New |
Headers | show |
diff --git a/libavcodec/mediacodecdec_common.c b/libavcodec/mediacodecdec_common.c index 1656cd6664..6c0a1212c1 100644 --- a/libavcodec/mediacodecdec_common.c +++ b/libavcodec/mediacodecdec_common.c @@ -567,7 +567,7 @@ int ff_mediacodec_dec_send(AVCodecContext *avctx, MediaCodecDecContext *s, AVPacket *pkt, bool wait) { int offset = 0; - int need_draining = 0; + int need_draining = pkt->size == 0; uint8_t *data; ssize_t index = s->current_input_buffer; size_t size; @@ -582,10 +582,6 @@ int ff_mediacodec_dec_send(AVCodecContext *avctx, MediaCodecDecContext *s, return AVERROR_EXTERNAL; } - if (pkt->size == 0) { - need_draining = 1; - } - if (s->draining && s->eos) { return AVERROR_EOF; }