bplaum / gmerlin-avdecoder

Gmerlin audio/video decoder library
GNU General Public License v2.0
2 stars 1 forks source link

FFMPEG-7.0 compat #12

Closed umlaeute closed 1 month ago

umlaeute commented 5 months ago

The old svn6298 snapshots of gmerlin-avdecoder are obviously not ready for FFMPEG7. However, it seems that current main (cfd606f56223ca44733ec833b69fd30ca6daab33) isn't either.

None of the code below has actually been tested...


the AVInputFormat struct no longer has as read_seek field, as used in: https://github.com/bplaum/gmerlin-avdecoder/blob/cfd606f56223ca44733ec833b69fd30ca6daab33/lib/demux_ffmpeg.c#L623

i think the correct way to check whether the stream is seekable is instead to check priv->avfc->pb->seekable


the AVCodecContext struct no longer has a channels field, instead we now must use the ch_layout.nb_channels, e.g. here https://github.com/bplaum/gmerlin-avdecoder/blob/cfd606f56223ca44733ec833b69fd30ca6daab33/lib/audio_ffmpeg.c#L209 or here https://github.com/bplaum/gmerlin-avdecoder/blob/cfd606f56223ca44733ec833b69fd30ca6daab33/lib/audio_ffmpeg.c#L403


avcoded_find_decoder() now returns as const AVCodec*, so we should use the const qualifier as well https://github.com/bplaum/gmerlin-avdecoder/blob/cfd606f56223ca44733ec833b69fd30ca6daab33/lib/audio_ffmpeg.c#L371-L375

bplaum commented 1 month ago

Fixed all things you reported. I don't have ffmpeg-7 here though (Newest is ffmpeg-6 from Ubuntu 24.04.) Please open a new issue when there are errors left in gmerlin-avdecoder or gmerlin-encoders.

umlaeute commented 2 weeks ago

i can confirm that i successfully compiled gmerlin-avcoder (and gavl, and gmerlin) in a pristine Debian/unstable container with ffmpeg7 and gcc14 installed.