diff --git a/libavcodec/utils.c b/libavcodec/utils.c index f960295830..0e8e466051 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1037,8 +1037,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; }