[FFmpeg-cvslog] avcodec: Set frame.width/height on all exit pathes of ff_get_buffer()

Michael Niedermayer git at videolan.org
Sun May 5 14:29:41 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun May  5 14:23:16 2013 +0200| [cdfa1c89b715aff78c39e68957f4e181e887cb01] | committer: Michael Niedermayer

avcodec: Set frame.width/height on all exit pathes of ff_get_buffer()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cdfa1c89b715aff78c39e68957f4e181e887cb01
---

 libavcodec/utils.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 8c99e55..4136d9f 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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;
 



More information about the ffmpeg-cvslog mailing list