Skip to content

Commit

Permalink
Fix ffmpeg 5 channels depcrecation
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Sep 21, 2023
1 parent 80979b0 commit 3b71944
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/zm_ffmpeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,13 @@ void zm_dump_stream_format(AVFormatContext *ic, int i, int index, int is_output)
zm_log_fps(1 / av_q2d(st->time_base), "stream tb numerator");
} else if (codec->codec_type == AVMEDIA_TYPE_AUDIO) {
Debug(1, "profile %d channels %d sample_rate %d",
codec->profile, codec->channels, codec->sample_rate);
codec->profile,
#if LIBAVUTIL_VERSION_CHECK(57, 28, 100, 28, 0)
codec->ch_layout.nb_channels,
#else
codec->channels,
#endif
codec->sample_rate);
} else {
Debug(1, "Unknown codec type %d", codec->codec_type);
}
Expand Down

0 comments on commit 3b71944

Please sign in to comment.