From f1f5b34d7b592f82526903dd2208b620be2a72e3 Mon Sep 17 00:00:00 2001 From: nquah Date: Thu, 21 Dec 2023 10:50:15 -0500 Subject: [PATCH] obs-outputs: Switch RTMP color metadata order Sends color metadata before the video header for RTMP streams. Only applicable to HDR RTMP streams. Ensures the server sees the correctly configured color metadata first, in cases where the decoder config in the video header has incorrect or missing color information. Mitigates a bug that users with outdated AMD drivers may encounter. --- plugins/obs-outputs/rtmp-stream.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/obs-outputs/rtmp-stream.c b/plugins/obs-outputs/rtmp-stream.c index dab8cdd27..51168b918 100644 --- a/plugins/obs-outputs/rtmp-stream.c +++ b/plugins/obs-outputs/rtmp-stream.c @@ -923,8 +923,6 @@ static inline bool send_headers(struct rtmp_stream *stream) if (!send_audio_header(stream, i++, &next)) return false; - if (!send_video_header(stream)) - return false; // send metadata only if HDR video_t *video = obs_get_video(); @@ -934,6 +932,9 @@ static inline bool send_headers(struct rtmp_stream *stream) if (!send_video_metadata(stream)) // Y2023 spec return false; + if (!send_video_header(stream)) + return false; + while (next) { if (!send_audio_header(stream, i++, &next)) return false;