mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-30 22:00:51 +08:00
lavc/mjpegenc: check av_frame_alloc() failure.
This commit is contained in:
@@ -548,6 +548,8 @@ static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
|
||||
return -1;
|
||||
|
||||
pic = av_frame_alloc();
|
||||
if (!pic)
|
||||
return AVERROR(ENOMEM);
|
||||
av_frame_ref(pic, pic_arg);
|
||||
//picture should be flipped upside-down
|
||||
for(i=0; i < 3; i++) {
|
||||
|
||||
Reference in New Issue
Block a user