Browse Source

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.
tags/n2.0
Janne Grunau 12 years ago
parent
commit
a2816230c5
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/utils.c

+ 2
- 1
libavcodec/utils.c View File

@@ -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);
}



Loading…
Cancel
Save