Skip to content
Snippets Groups Projects
Commit 7d2a6826 authored by Vittorio Giovara's avatar Vittorio Giovara Committed by Luca Barbato
Browse files

huffyuv: Check memory allocation

parent 7fccc96d
No related branches found
No related tags found
No related merge requests found
...@@ -155,7 +155,7 @@ static av_cold int encode_init(AVCodecContext *avctx) ...@@ -155,7 +155,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
s->version = 2; s->version = 2;
avctx->coded_frame = av_frame_alloc(); avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame) if (!avctx->extradata || !avctx->stats_out || !avctx->coded_frame)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment