Skip to content

Commit

Permalink
Restore compatibility with ffmpeg 4
Browse files Browse the repository at this point in the history
According to ffmpeg’s APIchanges (https://github.com/FFmpeg/FFmpeg/blob/master/doc/APIchanges),
the signature for av_find_best_stream changed with libavf 59.
  • Loading branch information
fmang committed Feb 4, 2023
1 parent 82e1a30 commit d381257
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/audio/stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ static int open_demuxer(const char *url, oshu::stream *stream)
stream->demuxer,
AVMEDIA_TYPE_AUDIO,
-1, -1,
#if (LIBAVFORMAT_VERSION_MAJOR < 59)
&stream->codec,
#else
(const AVCodec**)&stream->codec,
#endif
0
);
if (rc < 0 || stream->codec == NULL) {
Expand Down

0 comments on commit d381257

Please sign in to comment.