Skip to content

Commit 98321f8

Browse files
committed
emerg fix: Fix audio.
1 parent 0f0265d commit 98321f8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

media-playback/media.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,10 @@ static void mp_media_next_audio(mp_media_t *m)
360360
struct obs_source_audio audio = {0};
361361
AVFrame *f = d->frame;
362362
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
363+
if (avformat_version() < AV_VERSION_INT(59, 19, 100))
364+
channels = f->channels;
365+
else
366+
channels = f->ch_layout.nb_channels;
368367

369368
if (!mp_media_can_play_frame(m, d))
370369
return;

0 commit comments

Comments
 (0)