From 2a0eb8685728ccb260e42f60e1dbefe47ababbc3 Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Tue, 6 Mar 2018 13:07:32 -0800 Subject: avcodec/mediacodecdec: add delay_flush option The default behavior of the mediacodec decoder before this commit was to delay flushes until all pending hardware frames were returned to the decoder. This was useful for certain types of applications, but was unexpected behavior for others. The new default behavior with this commit is now to execute flushes immediately to invalidate all pending frames. The old behavior can be enabled by setting delay_flush=1. With the new behavior, video players implementing seek can simply call flush on the decoder without having to worry about whether they have one or more mediacodec frames still buffered in their rendering pipeline. Previously, all these frames had to be explictly freed (or rendered) before the seek/flush would execute. The new behavior matches the behavior of all other lavc decoders, reducing the amount of special casing required when using the mediacodec decoder. Signed-off-by: Aman Gupta Signed-off-by: Matthieu Bouron --- doc/APIchanges | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/APIchanges') diff --git a/doc/APIchanges b/doc/APIchanges index d1957e2..297a5a2 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,11 @@ libavutil: 2017-10-21 API changes, most recent first: +2018-03-xx - xxxxxxx - lavc 58.14.100 - mediacodec.h + Change the default behavior of avcodec_flush() on mediacodec + video decoders. To restore the previous behavior, use the new + delay_flush=1 option. + 2018-03-xx - xxxxxxx - lavu 56.8.100 - frame.h Add av_frame_new_side_data_from_buf(). -- cgit v1.1