mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 22:23:31 +00:00
Use av_frame_copy_props() to copy metadata
This commit is contained in:
@@ -329,10 +329,10 @@ AVFrame* SdlRenderer::getSwFrameFromHwFrame(AVFrame* hwFrame)
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// av_hwframe_transfer_data() can nuke frame metadata,
|
// av_hwframe_transfer_data() doesn't transfer metadata
|
||||||
// so anything other than width, height, and format must
|
// (and can even nuke existing metadata in dst), so we
|
||||||
// be set *after* calling av_hwframe_transfer_data().
|
// will propagate metadata manually afterwards.
|
||||||
swFrame->colorspace = hwFrame->colorspace;
|
av_frame_copy_props(swFrame, hwFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
return swFrame;
|
return swFrame;
|
||||||
|
|||||||
Reference in New Issue
Block a user