[FFmpeg-devel] Use of non-public symbols between libraries

Martin Storsjö martin
Thu May 13 23:45:39 CEST 2010


As discussed earlier, libav* do use quite a bit of non-public stuff 
from each other, and in the cases where they actually link to non-public 
symbols between the libraries, this may give problems for distros shipping 
the libraries in different packages, if such a non-public symbol were to 
be removed/renamed.

I don't have any suggestions on how to proceed with it, but I guess the 
options are:
- Ignore them, assuming that they won't ever be changed. Document them, 
  adding notes that removing them may break linking for users, and 
  changing their behaviour can give funny results in a mixed version scenario
- Make the functions public by renaming them to av_* and exporting those 
- Stop using the functions (usually not an option without massive code 

The cases that I found where libavformat and libavcodec had external 
references to ff_* named symbols were:

        lavc/aac_parser.h: ff_aac_parse_header

        lavc/ac3_parser.h: ff_ac3_parse_header

        lavc/mpeg4audio.h: ff_copy_pce_data

        lavc/dirac.h: ff_dirac_parse_sequence_header

lavf/dv.c, dvenc.c:
        lavc/dvdata.h: ff_dv_codec_profile

        lavc/dvdata.h: ff_dv_frame_profile

lavf/mpegtsenc.c, rtpenc_mpv.c:
        lavc/mpegvideo.h: ff_find_start_code

lavf/flacenc.c, flacenc_header.c, oggenc.c:
        lavc/flac.h: ff_flac_is_extradata_valid

        lavc/flac.h: ff_flac_parse_block_header

lavf/flacdec.c, oggparseflac.c:
        lavc/flac.h: ff_flac_parse_streaminfo

        lavc/mpeg12data.h: ff_frame_rate_tab

lavf/rtsp.c, lavc/tiertexseqv.c, xsubdec.c, xsubenc.c:
        lavu/common.h: ff_log2_tab

lavc/motion_est.c, mpegvideo.c, mpegvideo_enc.c, ra144.c, ratecontrol.c, 
roqaudioenc.c, snow.c:
        lavu/intmath.h: ff_sqrt (inline, linking to ff_sqrt_tab)

        lavc/mpegaudiodata.h: ff_mpa_bitrate_tab

        lavc/mpegaudio.h: ff_mpa_decode_header

lavf/mov.c, nutenc.c:
        lavc/mpegaudiodata.h: ff_mpa_freq_tab

lavf/flvdec.c, mov.c:
        lavc/mpeg4audio.h: ff_mpeg4audio_get_config

lavf/matroskadec.c, matroskaenc.c:
        lavc/mpeg4audio.h: ff_mpeg4audio_sample_rates

        lavc/mpegaudiodecheader.h: ff_mpegaudio_decode_header

lavf/httpauth.c, mxfenc.c, rtpenc.c:
        lavu/random_seed.h: ff_random_get_seed

lavf/matroskaenc.c, oggenc.c:
        lavc/xiph.h: ff_split_xiph_headers

Should ff_random_get_seed perhaps be made public (add an av_ named 
function, and exporting the header)?

// Martin

More information about the ffmpeg-devel mailing list