diff --git a/libavcodec/vda_h264.c b/libavcodec/vda_h264.c index 4d2274d649..a1179f16e2 100644 --- a/libavcodec/vda_h264.c +++ b/libavcodec/vda_h264.c @@ -409,7 +409,7 @@ static int vda_h264_end_frame(AVCodecContext *avctx) sizeof(vda->frame), release_buffer, NULL, AV_BUFFER_FLAG_READONLY); - if (!frame->buf) + if (!frame->buf[0]) return AVERROR(ENOMEM); frame->data[3] = (uint8_t*)vda->frame;