aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-08-03 07:54:09 +0200
committerdec05eba <dec05eba@protonmail.com>2024-08-03 07:54:09 +0200
commit55d92505339bb0519308c6786a9fade9b2598415 (patch)
tree5dc1ac6b6d955f9c66a8e9f5d5d528dff25bcc0c /src/main.cpp
parentdde9c3f12e7ba97e7cd37a80f2983da4d1b3b249 (diff)
Fix build for older ffmpeg (hdr metadata)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 43e68a4..62e417a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1320,13 +1320,13 @@ static bool add_hdr_metadata_to_video_stream(gsr_capture *cap, AVStream *video_s
// TODO: More error checking
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 31, 102)
- const bool added_light_metadata = av_stream_add_side_data(video_stream, AV_PKT_DATA_CONTENT_LIGHT_LEVEL, light_metadata, light_metadata_size);
+ const bool added_light_metadata = av_stream_add_side_data(video_stream, AV_PKT_DATA_CONTENT_LIGHT_LEVEL, (uint8_t*)light_metadata, light_metadata_size);
#else
av_packet_side_data_add(&video_stream->codecpar->coded_side_data, &video_stream->codecpar->nb_coded_side_data, AV_PKT_DATA_CONTENT_LIGHT_LEVEL, light_metadata, light_metadata_size, 0);
#endif
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 31, 102)
- const bool added_display_metadata = av_stream_add_side_data(video_stream, AV_PKT_DATA_MASTERING_DISPLAY_METADATA, mastering_display_metadata, sizeof(*mastering_display_metadata));
+ const bool added_display_metadata = av_stream_add_side_data(video_stream, AV_PKT_DATA_MASTERING_DISPLAY_METADATA, (uint8_t*)mastering_display_metadata, sizeof(*mastering_display_metadata));
#else
av_packet_side_data_add(&video_stream->codecpar->coded_side_data, &video_stream->codecpar->nb_coded_side_data, AV_PKT_DATA_MASTERING_DISPLAY_METADATA, mastering_display_metadata, sizeof(*mastering_display_metadata), 0);
#endif