Commit 19a2d101 authored by Nicolas George's avatar Nicolas George

lavc/mjpegenc: check av_frame_alloc() failure.

parent 97af2faa
...@@ -548,6 +548,8 @@ static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt, ...@@ -548,6 +548,8 @@ static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
return -1; return -1;
pic = av_frame_alloc(); pic = av_frame_alloc();
if (!pic)
return AVERROR(ENOMEM);
av_frame_ref(pic, pic_arg); av_frame_ref(pic, pic_arg);
//picture should be flipped upside-down //picture should be flipped upside-down
for(i=0; i < 3; i++) { for(i=0; i < 3; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment