[FFmpeg-cvslog] avframe: call release_buffer only if it is set
Janne Grunau
git at videolan.org
Wed Mar 13 13:52:10 CET 2013
ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Mon Mar 11 16:24:36 2013 +0100| [a2816230c5c0a8fc72bc0163b7d21a96b194d87a] | committer: Janne Grunau
avframe: call release_buffer only if it is set
AVCodecContext release_buffer() shall be NULL for audio codecs using
get_buffer. The backward compatibility code hence have to check before
calling it.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a2816230c5c0a8fc72bc0163b7d21a96b194d87a
---
libavcodec/utils.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 0106b91..b4c294e 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -535,7 +535,8 @@ typedef struct CompatReleaseBufPriv {
static void compat_free_buffer(void *opaque, uint8_t *data)
{
CompatReleaseBufPriv *priv = opaque;
- priv->avctx.release_buffer(&priv->avctx, &priv->frame);
+ if (priv->avctx.release_buffer)
+ priv->avctx.release_buffer(&priv->avctx, &priv->frame);
av_freep(&priv);
}
More information about the ffmpeg-cvslog
mailing list