[FFmpeg-devel] [PATCH] Update lix264.c for x264 API change (X264_BUILD 79)

Reimar Döffinger Reimar.Doeffinger
Sat Nov 21 20:24:09 CET 2009


On Sat, Nov 21, 2009 at 11:16:44AM -0800, Jason Garrett-Glaser wrote:
> 2009/11/21 M?ns Rullg?rd <mans at mansr.com>:
> > Jason Garrett-Glaser <darkshikari at gmail.com> writes:
> >
> >> On Fri, Nov 20, 2009 at 2:49 AM, Matthieu <mcrapet at gmail.com> wrote:
> >>> Grettings,
> >>
> >> At least do it right. ?Forcing a perfectly good feature off is bad news.
> >>
> >> Index: libavcodec/avcodec.h
> >> ===================================================================
> >> --- libavcodec/avcodec.h ? ? ?(revision 20562)
> >> +++ libavcodec/avcodec.h ? ? ?(working copy)
> >> @@ -1197,7 +1197,16 @@
> >>
> >> ? ? ?int b_frame_strategy;
> >>
> >> +#if LIBAVCODEC_VERSION_MAJOR < 53
> >> ? ? ?/**
> >> + ? ? * explicit weighted prediction analysis method
> >> + ? ? * - encoding: Set by user.
> >> + ? ? * - decoding: unused
> >> + ? ? */
> >> + ? ?int weighted_p_pred;
> >> +#endif
> >
> > What's with the #if? ?This breaks ABI.
> 
> Er, oops, that should have been a >= ... but now I realize that the
> #ifs are only for deprecated options, not for new ones.
> 
> Adding new options always breaks ABI, if only by changing the size of
> the struct--how is this usually handled?

 * main external API structure.
 * New fields can be added to the end with minor version bumps.
 * Removal, reordering and changes to existing fields require a major
 * version bump.
 * sizeof(AVCodecContext) must not be used outside libav*.



More information about the ffmpeg-devel mailing list