[FFmpeg-devel] [PATCH] lavfi: consistently use int for sample_rate in AVFilterLink and AVFilterBufferRefAudioProps

Stefano Sabatini stefano.sabatini-lala at poste.it
Mon Aug 22 01:09:26 CEST 2011


On date Sunday 2011-08-21 21:33:37 +0200, Michael Niedermayer encoded:
> On Sun, Aug 21, 2011 at 07:38:35PM +0200, Michael Niedermayer wrote:
> > On Sun, Aug 21, 2011 at 07:23:49PM +0200, Stefano Sabatini wrote:
[...]
> > > diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
> > > index 03fc83a..4aae4db 100644
> > > --- a/libavfilter/avfilter.h
> > > +++ b/libavfilter/avfilter.h
> > > @@ -102,7 +102,7 @@ typedef struct AVFilterBuffer {
> > >  typedef struct AVFilterBufferRefAudioProps {
> > >      int64_t channel_layout;     ///< channel layout of audio buffer
> > >      int nb_samples;             ///< number of audio samples per channel
> > > -    uint32_t sample_rate;       ///< audio buffer sample rate
> > > +    int sample_rate;            ///< audio buffer sample rate
> > >      int planar;                 ///< audio buffer - planar or packed
> > >  } AVFilterBufferRefAudioProps;
> > >
> > 
> > > @@ -607,7 +607,7 @@ struct AVFilterLink {
> > >      AVRational sample_aspect_ratio; ///< agreed upon sample aspect ratio
> > >      /* These parameters apply only to audio */
> > >      int64_t channel_layout;     ///< channel layout of current buffer (see libavutil/audioconvert.h)
> > > -    int64_t sample_rate;        ///< samples per second
> > > +    int sample_rate;            ///< samples per second
> > >      int planar;                 ///< agreed upon packing mode of audio buffers. true if planar.
> > 
> > this breaks ABI
> 
> Let me elaborate on this a bit
> I know libavfilter isnt really stable ABI yet but ffmpeg
> and ffplay use libavfilter and if one of their dependancies changes
> ABI without soname/major ver bump then this leads to problems for
> binaries of these tools

Yes I'm aware of this.

So what is the plan? Should we avoid ABI breaks, adding backward
compatibility layers? Or can we simply break compatibility, relying on
formal releases for users which need ABI stability?

I plan still a few API/ABI breaks in the short term, before I can
consider the API stable.
-- 
FFmpeg = Foolish and Freak Mythic Pacific Eretic Game


More information about the ffmpeg-devel mailing list