mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2025-03-05 07:07:18 +00:00
Use av_frame_copy_props() to copy metadata
This commit is contained in:
parent
f7c8ad4c5a
commit
67c801c4e7
1 changed files with 4 additions and 4 deletions
|
@ -329,10 +329,10 @@ AVFrame* SdlRenderer::getSwFrameFromHwFrame(AVFrame* hwFrame)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
// av_hwframe_transfer_data() can nuke frame metadata,
|
||||
// so anything other than width, height, and format must
|
||||
// be set *after* calling av_hwframe_transfer_data().
|
||||
swFrame->colorspace = hwFrame->colorspace;
|
||||
// av_hwframe_transfer_data() doesn't transfer metadata
|
||||
// (and can even nuke existing metadata in dst), so we
|
||||
// will propagate metadata manually afterwards.
|
||||
av_frame_copy_props(swFrame, hwFrame);
|
||||
}
|
||||
|
||||
return swFrame;
|
||||
|
|
Loading…
Add table
Reference in a new issue