diff mbox

[FFmpeg-devel] avcodec/rkmpp: stop blocking output while input is not full

Message ID 20190421082251.16430-1-aicommander@gmail.com
State New
Headers show

Commit Message

Cameron Gutman April 21, 2019, 8:22 a.m. UTC
By requiring that the decoder stay full, we introduce unnecessary
output latency when decoding from a real-time source. Additionally,
we can cause MPP to assert if we submit data, but don't actually
output a frame before closing our decoding session, because it
expects us to read the format change before cleaning up MPP.

The resulting crash looks like:

mpp_dec: task no send to hal que must clr current frame hal status
mpp_buf_slot: Assertion slot->status.has_frame failed at mpp_buf_slot_get_prop:877
mpp_dec: Assertion info_frame failed at mpp_dec_hal_thread:637
mpp_frame: check_is_mpp_frame pointer (nil) failed on check
mpp_frame: check_is_mpp_frame pointer (nil) failed on check

Tested on RK3288 (Asus Tinkerboard)

Signed-off-by: Cameron Gutman <aicommander@gmail.com>
---
 libavcodec/rkmppdec.c | 4 ----
 1 file changed, 4 deletions(-)
diff mbox

Patch

diff --git a/libavcodec/rkmppdec.c b/libavcodec/rkmppdec.c
index 143d05bd51..e8a0b42554 100644
--- a/libavcodec/rkmppdec.c
+++ b/libavcodec/rkmppdec.c
@@ -524,10 +524,6 @@  static int rkmpp_receive_frame(AVCodecContext *avctx, AVFrame *frame)
                 return ret;
             }
         }
-
-        // make sure we keep decoder full
-        if (freeslots > 1)
-            return AVERROR(EAGAIN);
     }
 
     return rkmpp_retrieve_frame(avctx, frame);