mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-28 18:24:17 -05:00
Fixes issue #10369.
Since the update to FFmpeg 6.1, streams to a Media Source are broken
if hardware decoding is enabled (both RTMP or SRT have been reported).
The video is black although the audio is decoded fine.
The manual copy of metadata introduced in commit [1] does not work any
more for some unfathomable reasons.
As a fix we call instead the av_frame_copy_props function used in FFmpeg
app in a similar context (hardware decoding) [2].
The metadata are copied without issues.
There is no need to guard the use of that function since it was
introduced 9 years ago in avutil/frame.c.
[1] https://github.com/obsproject/obs-studio/commit/22fde5cdcd1c784cd60b8a8cd50af02e7e537182
[2] https://github.com/FFmpeg/FFmpeg/master/fftools/ffmpeg_dec.c
Signed-off-by: pkv <pkv@obsproject.com>
(cherry picked from commit 41f07913e5)