[FFmpeg-devel] [PATCH] zerocodec: fix direct rendering.
Reimar.Doeffinger at gmx.de
Sat Jul 21 13:42:26 CEST 2012
On Sat, Jul 21, 2012 at 11:32:06AM +0000, Paul B Mahol wrote:
> On 7/21/12, Reimar Doeffinger <Reimar.Doeffinger at gmx.de> wrote:
> > Set picture type before calling get_buffer.
> > This allows the DR application to make better decisions.
> > It also fixes a resource leak in case of missing reference frames
> > since it would call get_buffer but never release_buffer.
> > Also use FFSWAP to ensure that the AVFrame is properly initialized
> > in the next get_buffer (in particular that data is NULL).
> > Signed-off-by: Reimar Doeffinger <Reimar.Doeffinger at gmx.de>
> > ---
> > libavcodec/zerocodec.c | 34 +++++++++++++++++-----------------
> > 1 file changed, 17 insertions(+), 17 deletions(-)
> What about reget_buffer()?
Could be used, but then you need another buffer to do the zlib
compression into first.
Doesn't seem like much of a win to me.
All that you'd win I think is that you can decompress the whole
frame in one go.
On the other hand it might give worse cache performance...
More information about the ffmpeg-devel