Fix compatibility with ffmpeg 8

Fixes #29713.
This commit is contained in:
Lukas Fleischer
2025-09-25 10:17:59 -04:00
committed by John Preston
parent 8aa5ebf621
commit b009f06375
@@ -683,10 +683,10 @@ int DurationByPacket(const Packet &packet, AVRational timeBase) {
}
int ReadRotationFromMetadata(not_null<AVStream*> stream) {
const auto displaymatrix = av_stream_get_side_data(
stream,
AV_PKT_DATA_DISPLAYMATRIX,
nullptr);
const auto displaymatrix = av_packet_side_data_get(
stream->codecpar->coded_side_data,
stream->codecpar->nb_coded_side_data,
AV_PKT_DATA_DISPLAYMATRIX);
auto theta = 0;
if (displaymatrix) {
theta = -round(av_display_rotation_get((int32_t*)displaymatrix));