History

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.

Aman Gupta committed 8 years ago

Commit 2a0eb861 parent 840f6eb6 files · +44 −6Browse files

Showing the changes to doc/APIchanges (1 of 6 files). Show all

Unified · Split

doc/APIchanges+5−0
@@ -15,6 +15,11 @@ libavutil: 2017-10-21 · 14 unmodified lines
1515
1616 API changes, most recent first:
1717
18+2018-03-xx - xxxxxxx - lavc 58.14.100 - mediacodec.h
19+ Change the default behavior of avcodec_flush() on mediacodec
20+ video decoders. To restore the previous behavior, use the new
21+ delay_flush=1 option.
22+
1823 2018-03-xx - xxxxxxx - lavu 56.8.100 - frame.h
1924 Add av_frame_new_side_data_from_buf().
2025

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t