avcodec: Set frame.width/height on all exit pathes of ff_get_buffer()
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 5 May 2013 12:23:16 +0000 (14:23 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 5 May 2013 12:23:16 +0000 (14:23 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/utils.c

index 8c99e55..4136d9f 100644 (file)
@@ -722,7 +722,7 @@ static int get_buffer_internal(AVCodecContext *avctx, AVFrame *frame, int flags)
          * avcodec_default_get_buffer
          */
         if (frame->buf[0])
-            return 0;
+            goto end;
 
         priv = av_mallocz(sizeof(*priv));
         if (!priv) {
@@ -798,6 +798,7 @@ do {                                                                    \
 
         av_buffer_unref(&dummy_buf);
 
+end:
         frame->width  = avctx->width;
         frame->height = avctx->height;