We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f0265d commit 98321f8Copy full SHA for 98321f8
media-playback/media.cpp
@@ -360,11 +360,10 @@ static void mp_media_next_audio(mp_media_t *m)
360
struct obs_source_audio audio = {0};
361
AVFrame *f = d->frame;
362
int channels;
363
-#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(59, 19, 100)
364
- channels = f->channels;
365
-#else
366
- channels = f->ch_layout.nb_channels;
367
-#endif
+ if (avformat_version() < AV_VERSION_INT(59, 19, 100))
+ channels = f->channels;
+ else
+ channels = f->ch_layout.nb_channels;
368
369
if (!mp_media_can_play_frame(m, d))
370
return;
0 commit comments