[FFmpeg-devel] ABI (in)stability of FFmpeg

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Sun Jul 27 22:18:16 CEST 2014


the commit message of 6e8e9f1e517ee52fe439f3e8ca762f09d235f21e reads:
"Merge commit '8c02adc62d71dfbb079a04753d8c16152c49de88'

* commit '8c02adc62d71dfbb079a04753d8c16152c49de88':
   lavu: add all color-related enums to AVFrame


The version check is changed so they are available with the current ABI
FFmpeg libs should have no problems with added fields, nor should any
application using the libs, and we regularly added fields in the past.
We also moved 2 of these fields to AVFrame already previously without 

This seems to be wrong, at least vlc has a problem with this.
If you compile it against 2.2 and then install a version of FFmpeg 
containing this commit, without recompiling vlc against it, the 
following crash can be observed:

$ vlc Test.wmv
VLC media player 2.1.4 Rincewind (revision 2.1.4-0-g2a072be)
[0x74c6b8] main libvlc: Running vlc with the default interface. Use 
'cvlc' to use vlc without interface.
*** Error in `Fontconfig warning: FcPattern object size does not accept 
value "0"
vlc': free(): invalid pointer: 0x00007f0e20d7db38 ***
Aborted (core dumped)

The backtrace is:
#0  0x00007f0e5b77e407 in __GI_raise (sig=sig at entry=6) at 
#1  0x00007f0e5b77f7e8 in __GI_abort () at abort.c:89
#2  0x00007f0e5b7bc394 in __libc_message (do_abort=do_abort at entry=1, 
fmt=fmt at entry=0x7f0e5b8af010 "*** Error in `%s': %s: 0x%s ***\n") at 
#3  0x00007f0e5b7c1b6e in malloc_printerr (action=1, str=0x7f0e5b8ab0c8 
"free(): invalid pointer", ptr=<optimized out>) at malloc.c:4996
#4  0x00007f0e5b7c2876 in _int_free (av=<optimized out>, p=<optimized 
out>, have_lock=0) at malloc.c:3840
#5  0x00007f0e1e5b9d80 in av_freep (arg=arg at entry=0x7f0e1bd50da8) at 
#6  0x00007f0e1e5aaa0d in av_buffer_unref (buf=buf at entry=0x7f0e1bd50da8) 
at libavutil/buffer.c:112
#7  0x00007f0e1e5b2806 in av_frame_unref (frame=0x7f0e1bd50b30) at 
#8  0x00007f0e1ed1e429 in avcodec_decode_audio4 (avctx=0x7f0e20d7e620, 
frame=0x7f0e1bd50b30, got_frame_ptr=0x7f0e1bd50acc, 
avpkt=0x7f0e1bd50ad0) at libavcodec/utils.c:2412
#9  0x00007f0e1f9e3977 in DecodeAudio (p_dec=0x7f0e20d7db38, 
pp_block=0x7f0e1bd50e28) at avcodec/audio.c:287
#10 0x00007f0e5b49a61e in DecoderDecodeAudio 
(p_dec=p_dec at entry=0x7f0e20d7db38, p_block=p_block at entry=0x7f0e20dbd520) 
at input/decoder.c:1259
#11 0x00007f0e5b49c1a1 in DecoderProcessAudio (b_flush=false, 
p_block=0x7f0e20dbd520, p_dec=<optimized out>) at input/decoder.c:1889
#12 DecoderProcess (p_block=<optimized out>, p_dec=<optimized out>) at 
#13 DecoderThread (p_data=0x7f0e20d7db38) at input/decoder.c:936
#14 0x00007f0e5bcfe0a4 in start_thread (arg=0x7f0e1bd51700) at 
#15 0x00007f0e5b82f04d in clone () at 

So I suggest to revert to the old ABI until the next soversion bump.

Best regards,

More information about the ffmpeg-devel mailing list