summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-05 14:23:16 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-05 14:23:16 +0200
commitcdfa1c89b715aff78c39e68957f4e181e887cb01 (patch)
tree6f8d4b594d64fe9b6be07042cd8f39c6e1ef26fc /libavcodec/utils.c
parent548101b553cb6448d7019623b6e9d89811342748 (diff)
avcodec: Set frame.width/height on all exit pathes of ff_get_buffer()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 8c99e55759..4136d9fda2 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;