[FFmpeg-devel] [PATCH] ffplay: Update input_get_buffer() to match avcodec_default_get_buffer()

Michael Niedermayer michaelni at gmx.at
Fri Oct 7 02:01:43 CEST 2011


On Thu, Oct 06, 2011 at 07:30:22PM +0200, Michael Niedermayer wrote:
> On Thu, Oct 06, 2011 at 01:14:17PM +0200, Michael Niedermayer wrote:
> > On Thu, Oct 06, 2011 at 11:13:48AM +0200, Nicolas George wrote:
> > > Le quintidi 15 vendémiaire, an CCXX, Michael Niedermayer a écrit :
> > > > Subject: [PATCH] ffplay: Update input_get_buffer() to match avcodec_default_get_buffer()
> > > 
> > > Shouldn't the same change be made to reget_buffer? It is not done in
> > > lavc/utils.c, but it seems wrong.
> > > 
> > > Maybe a common function would be a good thing:
> > > 	avcodec_init_buffer_info(avctx, pix)
> > > ?
> > 
> > I think even better would be below + updating all decoders
> > the advanatge would be that applications would not need to be chnaged
> > nor have to deal with extra complexity and yet another function
> > 
> > int avcodec_get_buffer(AVCodecContext *s, AVFrame *pic, int reget, int reference){
> 
> Iam going to add this function later today unless there is someone
> screamin "stop, i have a better idea"

ive found a even better solution, namely to call the init from
ff_thread_get_buffer() and use this in decoders.
for non threaded codecs it just does a get_buffer()

this avoids having another API and the added confusion of
which to use. We just need a matching one for reget buffer and maybe
one day give it a better name without "thread" in it

    
[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111007/4a29bebc/attachment.asc>


More information about the ffmpeg-devel mailing list