[Ffmpeg-devel] [PATCH] use avcodec_decode_audio2 in ffplay.c
Michael Niedermayer
michaelni
Thu Mar 8 12:50:04 CET 2007
Hi
On Thu, Mar 08, 2007 at 12:48:23PM +0800, Limin Wang wrote:
> Hi,
>
> * Michael Niedermayer <michaelni at gmx.at> [2007-03-08 04:17:57 +0100]:
>
> > Hi
> >
> > On Thu, Mar 08, 2007 at 10:03:53AM +0800, Limin Wang wrote:
> > > Hi,
> > >
> > > * Michael Niedermayer <michaelni at gmx.at> [2007-03-07 15:36:39 +0100]:
> > >
> > > > Hi
> > > >
> > > > On Wed, Mar 07, 2007 at 06:16:38PM +0800, Limin Wang wrote:
> > > > > Hi,
> > > > >
> > > > > As 'avcodec_decode_audio' is deprecated, the patch try to replace it with
> > > > > avcodec_decode_audio2.
> > > >
> > > > as audio_buf is passed as argument into audio_decode_frame() so should
> > > > its size, instead of hardcoding the current size, this is very risky as
> > > > there is nothing in the functions documentation which says that the
> > > > buffer must be that large
> > >
> > > Yes, now audio_buf is allocated by array, so input the audio_buf actual size by
> > > sizeof(), please review it.
> >
> > as avcodec_decode_audio2() changes data_size this wont work
>
> Yes, it's necessary to reset the data_size to buf_size every time. I have tested with
> several samples with the new patch and it's OK.
looks ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070308/fec6854b/attachment.pgp>
More information about the ffmpeg-devel
mailing list