[Cin] 'nb_index_entries' in 'AVStream' gone in ffmpeg 5

Andrew Randrianasulu randrianasulu at gmail.com
Fri Apr 1 22:02:04 CEST 2022


Hello!

I try to make our software (Cinelerra-gg, non-linear video editor [0])
compile-able with latest ffmpeg, right now I down to 7 errors:

ffmpeg.C:726:11: error: no member named 'nb_index_entries' in 'AVStream'
if( st->nb_index_entries > 0 ) tstmp = st->index_entries[0].timestamp; ~~ ^
ffmpeg.C:726:46: error: no member named 'index_entries' in 'AVStream' if(
st->nb_index_entries > 0 ) tstmp = st->index_entries[0].timestamp; ~~ ^
ffmpeg.C:728:16: error: no member named 'first_dts' in 'AVStream' else if(
st->first_dts != AV_NOPTS_VALUE ) tstmp = st->first_dts; ~~ ^
ffmpeg.C:728:58: error: no member named 'first_dts' in 'AVStream' else if(
st->first_dts != AV_NOPTS_VALUE ) tstmp = st->first_dts; ~~ ^

ffmpeg.C:3030:35: error: no member named 'codec' in 'AVStream' ret =
avcodec_copy_context(st->codec, ctx); ~~ ^

ffmpeg.C:4092:19: error: no member named 'nb_index_entries' in 'AVStream'
int nb_ent = st->nb_index_entries; ~~ ^ ffmpeg.C:4095:27: error: no member
named 'index_entries' in 'AVStream' AVIndexEntry *ep =
&st->index_entries[nb_ent-1]; ~~ ^
 18 warnings and 7 errors generated.
 make[2]: *** [Makefile:570: armv8l/ffmpeg.o] Error 1


sorry for formatting, copy/pasting from termux ( linux-on-android terminal
emulator + distribution)

so i guess those errs caused by

https://github.com/FFmpeg/FFmpeg/commit/557953a397dfdd9c7a3d8c2f60d1204599e3d3ac

(adds specific av_ functions for manipulating those index entries)

https://github.com/FFmpeg/FFmpeg/commit/3749eede66c3774799766b1f246afae8a6ffc9bb

(remove deprecated AVStream.codec - how to use replacement? )

and

https://github.com/FFmpeg/FFmpeg/commit/591b88e6787c4e678237f02a50421d101abd25c2
"avformat: move AVStream.{first,cur}_dts to AVStreamInternal
They are private fields, no reason to have them exposed in a public header.

Signed-off-by: James Almer <jamrial at gmail.com>"

while I hope to learn how to use new functions - I do not think I can
replace whole seeking logic with something new? can those fields added
back, or at least can you add some new functions to get them?

I try to compile with dynamic ffmpeg, so my configure line for cinelerra-gg
is

$ ./configure --with-single-user --without-thirdparty --without-dvb
--without-video4linux2 --without-dv --without-firewire --without-libzmpeg
--without-vdpau --without-vaapi --without-lv2 --without-openexr

our default is static linking, but at some point we hope to get new ffmpeg
(and experimental bsd support I work on requires dynamic linking, so as
soon as pkgsrc moves to new ffmpeg we are broken)


[0]
https://git.cinelerra-gg.org/git/?p=goodguy/cinelerra.git;a=blob;f=cinelerra-5.1/cinelerra/fileffmpeg.C;h=a6437242ddd633973252b2fcac7a9f9f4bab9e84;hb=HEAD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20220401/6f5d630c/attachment.htm>


More information about the Cin mailing list