[FFmpeg-devel] [RFC] VB decoder get_buffer usage
Fri Jun 5 19:15:05 CEST 2009
On Fri, Jun 05, 2009 at 05:31:18PM +0200, Michael Niedermayer wrote:
> On Fri, Jun 05, 2009 at 01:59:02AM -0700, Baptiste Coudurier wrote:
> > Hi guys,
> > It seems VB decoder uses get_buffer but in decode_init.
> > It seems same buffer is returned all frames.
> the VB decoder should be changed, i dont see any technical sense in
> reusing the buffer like that, but maybe i miss something
> > I guess this method is allowed, though what kind of FF_BUFFER_TYPE_
> > should be set in this case ?
> at least it is not sane ...
FF_BUFFER_TYPE_VERY_VERY_LAZY would be appropriate though
> reget_buffer() can be used to get the same data again but that too has
> to be called per frame and is not guranteed to return the same buffer in
> terms of its address
There's no need even for reget_buffer() in that decoder.
> > Should decoders using av_mallocz be ported to use get_buffer ?
> when possible, yes
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
More information about the ffmpeg-devel