This will be useful in the CUVID hwaccel. It should also eventually replace current decoder-specific mechanisms used by various other hwaccels. Merges Libav commit 704311b294.
704311b294