Commit cdfa1c89 authored by Michael Niedermayer's avatar Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 548101b5
...@@ -722,7 +722,7 @@ static int get_buffer_internal(AVCodecContext *avctx, AVFrame *frame, int flags) ...@@ -722,7 +722,7 @@ static int get_buffer_internal(AVCodecContext *avctx, AVFrame *frame, int flags)
* avcodec_default_get_buffer * avcodec_default_get_buffer
*/ */
if (frame->buf[0]) if (frame->buf[0])
return 0; goto end;
priv = av_mallocz(sizeof(*priv)); priv = av_mallocz(sizeof(*priv));
if (!priv) { if (!priv) {
...@@ -798,6 +798,7 @@ do { \ ...@@ -798,6 +798,7 @@ do { \
av_buffer_unref(&dummy_buf); av_buffer_unref(&dummy_buf);
end:
frame->width = avctx->width; frame->width = avctx->width;
frame->height = avctx->height; frame->height = avctx->height;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment