[MPlayer-dev-eng] [PATCH] use avcodec_decode_audio2
Michael Niedermayer
michaelni at gmx.at
Tue Mar 20 15:14:27 CET 2007
Hi
On Tue, Mar 20, 2007 at 04:00:57PM +0200, Uoti Urpala wrote:
> On Tue, 2007-03-20 at 12:50 +0100, Reimar Döffinger wrote:
> > Sorry, previous patch was only correct on the first loop iteration,
> > attached one might actually be correct (though either is an
> > improvement over the current situation with no checking at all).
>
> The current situation should be safe since dec_audio.c guarantees that
> maxlen >= minlen+sh_audio->audio_out_minsize. So decoders can safely
> ignore maxlen if they set audio_out_minsize to a suitable value.
>
> BTW does the avcodec_decode_audio2 interface() provide any way to know
> how large an output buffer you should use if you want to make sure it
> can hold a decoded packet? Or is AVCODEC_MAX_AUDIO_FRAME_SIZE still
> meant to be used for that?
for codecs with a constant number of samples per frame
AVCodecContext.frame_size could be used ...
maybe we should add a max_frame_size to AVCodecContext? for some codecs
this is known during init, for some theres no real guranteed max
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- 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/mplayer-dev-eng/attachments/20070320/cf6d0ed5/attachment.pgp>
More information about the MPlayer-dev-eng
mailing list