1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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.
This commit is contained in:
Janne Grunau 2013-03-11 16:24:36 +01:00
parent fce68c9355
commit a2816230c5

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