Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vaapi dec.: deduce SW format to reported valid
Set AVHWFramesContext::sw_format to first of av_hwframe_transfer_get_formats(). This is consistent how MPV does that. Fixes NV12 being transmitted despite AVHWFramesContext::sw_format was set to yuv420p causing chroma channels corruption (because the nv12 data was misinterpreted as the latter one) occuring on AMD cards, steps to reproduce: ``` uv -t testcard -c lavc:enc=libx264:safe -d gl --param use-hw-accel=vaapi ``` See also: <mpv-player/mpv@66e30e7>
- Loading branch information
1 parent
e5d628c
commit ac110f1
Showing
4 changed files
with
115 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters