diff --git a/libavcodec/utils.c b/libavcodec/utils.c index d5b01d6d2f..a83b0ba91b 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1032,8 +1032,10 @@ end: int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags) { int ret = get_buffer_internal(avctx, frame, flags); - if (ret < 0) + if (ret < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + frame->width = frame->height = 0; + } return ret; }