[FFmpeg-trac] #5057(undetermined:new): master broke AVCodecContext compatibility with LibAV project

FFmpeg trac at avcodec.org
Fri Dec 4 12:13:41 CET 2015


#5057: master broke AVCodecContext compatibility with LibAV project
-------------------------------------+-------------------------------------
             Reporter:  jyavenard    |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
              Version:  git-master   |  undetermined
             Keywords:               |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by michael):

 Replying to [comment:15 jyavenard]:
 > Replying to [comment:11 michael]:
 [...]
 > Another possibility I guess would be for you to provide us with a
 reliable way to differentiate libavcodec from libav or the one from
 FFmpeg.

 the micro version is 100 or larger in ffmpeg, avcodec_version() can be
 used to detect that, that will work with any half recent version. It wont
 work with really old versions


 [...]
 > > Now, is it still possible to link and use both across distros, iam not
 sure it very well might be.
 > > Most fields in AVCodecContext can be accessed through the AVOption
 API, see libavutil/opt.h
 > > Is this sufficient for your use case ?
 >
 > Going forward it may be. Is this something both forks support ?

 yes and i really think using the AVOption functions is a much more robust
 choice for the use case of providing a cross platform binary, than direct
 access.
 Also while at it, i would suggest (in case you dont already do) that you
 might want to avoid directly using enum values and defined values as well,
 many of them are available through lookup from strings through avoption
 functions or as a random example for one enum av_get_pix_fmt_name() for
 pix formats.
 C does not gurantee enums to have a specific type, nor do all values match
 between forks

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5057#comment:17>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list