aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2013-03-11 16:24:36 +0100
committerJanne Grunau <janne-libav@jannau.net>2013-03-11 18:58:47 +0100
commita2816230c5c0a8fc72bc0163b7d21a96b194d87a (patch)
tree640d8c2738f4d3f8c941dd4501fca59e0a826539 /libavcodec
parentfce68c93554803801c32c1b20509bfa8d496b02a (diff)
downloadffmpeg-a2816230c5c0a8fc72bc0163b7d21a96b194d87a.tar.gz
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.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 0106b91200..b4c294e0de 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);
}