]> git.sesse.net Git - ffmpeg/commitdiff
proresenc: Don't free a buffer not owned by the codec
authorMartin Storsjö <martin@martin.st>
Tue, 4 Sep 2012 11:57:45 +0000 (14:57 +0300)
committerMartin Storsjö <martin@martin.st>
Tue, 4 Sep 2012 12:32:12 +0000 (15:32 +0300)
The data in coded_frame isn't allocated using get_buffer, but
is copied from the input frame to the encoder, so we should
not try to free it ourselves.

This fixes an assert failure when running in debug mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavcodec/proresenc.c

index f4feed5ee41a1af619180f50f5414cf9c58d36de..86def008190fb83d49ebe68765eaaafa5ed2ad9d 100644 (file)
@@ -867,9 +867,6 @@ static av_cold int encode_close(AVCodecContext *avctx)
     ProresContext *ctx = avctx->priv_data;
     int i;
 
-    if (avctx->coded_frame->data[0])
-        avctx->release_buffer(avctx, avctx->coded_frame);
-
     av_freep(&avctx->coded_frame);
 
     if (ctx->tdata) {