mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/mediacodecdec: Skip dequeue buffer in draining state
There is no more packet to queue in draining state. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
parent
2e370805da
commit
aa14f9fe63
|
@ -462,7 +462,7 @@ static int mediacodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)
|
||||||
|
|
||||||
/* feed decoder */
|
/* feed decoder */
|
||||||
while (1) {
|
while (1) {
|
||||||
if (s->ctx->current_input_buffer < 0) {
|
if (s->ctx->current_input_buffer < 0 && !s->ctx->draining) {
|
||||||
/* poll for input space */
|
/* poll for input space */
|
||||||
index = ff_AMediaCodec_dequeueInputBuffer(s->ctx->codec, 0);
|
index = ff_AMediaCodec_dequeueInputBuffer(s->ctx->codec, 0);
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
|
|
Loading…
Reference in New Issue