From: Limin Wang <lance.lmw...@gmail.com> Signed-off-by: Limin Wang <lance.lmw...@gmail.com> --- libavcodec/bitpacked.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/libavcodec/bitpacked.c b/libavcodec/bitpacked.c index 8143151..0440df9 100644 --- a/libavcodec/bitpacked.c +++ b/libavcodec/bitpacked.c @@ -45,6 +45,10 @@ static int bitpacked_decode_uyvy422(AVCodecContext *avctx, AVFrame *frame, /* there is no need to copy as the data already match * a known pixel format */ frame->buf[0] = av_buffer_ref(avpkt->buf); + if (!frame->buf[0]) { + return AVERROR(ENOMEM); + } + ret = av_image_fill_arrays(frame->data, frame->linesize, avpkt->data, avctx->pix_fmt, avctx->width, avctx->height, 1); if (ret < 0) { -- 1.8.3.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".