[FFmpeg-devel] What's up with the API and ABI?
lucabe72 at email.it
Tue Apr 26 18:29:12 CEST 2011
since the infamous ffmpeg/libav split, a good number of programs using
ffmpeg libraries started to break because of arbitrary renamings...
That's annoying (it forces me to fill the programs with funky ifdefs to
support the git checkout of the day), but I can live with it.
But today I found a new interesting bug introduced for the sake of it: I
had a program calling " url_fopen(&o->outctx->pb, o->output_file,
URL_WRONLY);" (which was AFAIK legal until some days ago) which started
to fail in a misterious way.
At the end, I found out that url_fopen() now does "return avio_open(s,
filename, flags);"... But the avio_open() flags are completely different
from the url_fopen() flags (AVIO_FLAG_WRITE is 2, while URL_WRONLY is
1... Calling url_fopen() with URL_WRONLY results in trying to open a
file _for reading_!).
So, if you really want to rename url_fopen() (why? Just because
avio_open() is more trendy?) you have to either remove url_fopen() and
its flags, or update the flags values. Keeping a broken url_fopen() is
much worse than removing it without deprecation.
P.S.: if you reply to this email, please cc: me. In am not subscribed to
this mailing list.
More information about the ffmpeg-devel