Skip to content

Commit e693f64

Browse files
committed
win-dshow: Fix compiling with FFmpeg 7.0
1 parent dfd5798 commit e693f64

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugins/win-dshow/ffmpeg-decode.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,13 @@ bool ffmpeg_decode_audio(struct ffmpeg_decode *decode, uint8_t *data,
265265

266266
audio->samples_per_sec = decode->frame->sample_rate;
267267
audio->format = convert_sample_format(decode->frame->format);
268+
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59, 24, 100)
268269
audio->speakers =
269270
convert_speaker_layout((uint8_t)decode->decoder->channels);
271+
#else
272+
audio->speakers = convert_speaker_layout(
273+
(uint8_t)decode->decoder->ch_layout.nb_channels);
274+
#endif
270275

271276
audio->frames = decode->frame->nb_samples;
272277

0 commit comments

Comments
 (0)