codec_release_buffer: fix handling of non user buffers
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 22 Jun 2012 21:50:27 +0000 (23:50 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 22 Jun 2012 21:53:24 +0000 (23:53 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
cmdutils.c

index bce87a6eed7a7b57203190d8361e1fd371739502..557e1a601fad2cc6af43e9fb590a33faaefc92c8 100644 (file)
@@ -1343,8 +1343,10 @@ void codec_release_buffer(AVCodecContext *s, AVFrame *frame)
     FrameBuffer *buf = frame->opaque;
     int i;
 
-    if(frame->type!=FF_BUFFER_TYPE_USER)
+    if(frame->type!=FF_BUFFER_TYPE_USER) {
         avcodec_default_release_buffer(s, frame);
+        return;
+    }
 
     for (i = 0; i < FF_ARRAY_ELEMS(frame->data); i++)
         frame->data[i] = NULL;