On Mon, May 14, 2012 at 04:15:59PM +0200, Diego Biurrun wrote:
> On Mon, May 14, 2012 at 02:52:29PM +0100, Måns Rullgård wrote:
> > Diego Biurrun <[email protected]> writes:
> > 
> > > libavcodec/utils.c:251: note: expected ‘const uint8_t *’ but argument is 
> > > of type ‘const short int *’
> > > ---
> > >  libavcodec/utils.c |    3 ++-
> > >  1 files changed, 2 insertions(+), 1 deletions(-)
> > >
> > > I'm sending this strictly as an RFC since I'm not sure this is fit for
> > > pushing.  It silences a warning at the cost of a cast.  I believe the
> > > patch to be correct and am in favor overall, but since it's a tradeoff
> > > of sorts others may be opposed...
> > >
> > > --- a/libavcodec/utils.c
> > > +++ b/libavcodec/utils.c
> > > @@ -1047,7 +1047,8 @@ int attribute_align_arg 
> > > avcodec_encode_audio(AVCodecContext *avctx,
> > >          if ((ret = avcodec_fill_audio_frame(frame, avctx->channels,
> > >                                              avctx->sample_fmt,
> > > -                                            samples, samples_size, 1)))
> > > +                                            (const uint8_t *) samples,
> > > +                                            samples_size, 1)))
> > >              return ret;
> > 
> > Why is there a type mismatch at all?  If avcodec_fill_audio_frame()
> > works with multiple data types, it should be taking a void *.
> 
> samples is a function parameter of type 'const short *'.  Since the
> function where I'm adding this cast, avcodec_encode_audio(), is a
> public one, its signature cannot be changed without a version bump.
> 
> The function is slated for removal with the next version bump; the
> cast would go away along with it, but there would be less noise in
> the meantime.

.. ping ..

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to