History

v210enc: check return value of avcodec_alloc_frame()

Paul B Mahol committed 14 years ago

Commit bf0aea71 parent 70a8c791 file · +2 −0Browse files

Unified · Split

libavcodec/v210enc.c+2−0
@@ -41,6 +41,8 @@ static av_cold int encode_init(AVCodecContext *avctx) · 40 unmodified lines
4141 avctx->bits_per_raw_sample);
4242
4343 avctx->coded_frame = avcodec_alloc_frame();
44+ if (!avctx->coded_frame)
45+ return AVERROR(ENOMEM);
4446
4547 avctx->coded_frame->key_frame = 1;
4648 avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t