[FFmpeg-devel] MPEG TS encoding problem on change from stereo to mono, pay for fix

Stefano Sabatini stefano.sabatini-lala
Sun Nov 21 23:11:30 CET 2010


On date Friday 2010-11-19 23:05:34 +0100, Reimar D?ffinger encoded:
> On Fri, Nov 19, 2010 at 03:26:57PM +0100, Stefano Sabatini wrote:
> > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> > index bff9477..22e3615 100644
> > --- a/libavcodec/avcodec.h
> > +++ b/libavcodec/avcodec.h
> > @@ -3076,6 +3076,14 @@ ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
> >                                          int filter_length, int log2_phase_count,
> >                                          int linear, double cutoff);
> >  
> > +int av_audio_resample_reinit(ReSampleContext **ctx,
> > +                             int output_channels, int input_channels,
> > +                             int output_rate, int input_rate,
> > +                             enum AVSampleFormat sample_fmt_out,
> > +                             enum AVSampleFormat sample_fmt_in,
> > +                             int filter_length, int log2_phase_count,
> > +                             int linear, double cutoff);
> 
> I'm not convinced this should be public API, since it only
> checks for changes to the first arguments but not filter_length
> etc. I'd consider it too confusing/hackish to make it public...

The problem is that those values cannot be checked in the
ReSampleContext, as are defined in AVResampleContext, which is opaque
in resample.c where the function is defined.

If we want to quickly fix the problem we could simply state in the
docs that those values are supposed to be the same, or make
AVResampleContext definition visible in resample.c, which doesn't look
a good idea.
-- 
FFmpeg = Frenzy and Fiendish Magic Power Exciting Guide



More information about the ffmpeg-devel mailing list