History

Return if memory allocation fails.

Carl Eugen Hoyos committed 15 years ago

Commit 5a810f41 parent 045cc361 file · +2 −0Browse files

Unified · Split

libavcodec/tta.c+2−0
@@ -286,6 +286,8 @@ static av_cold int tta_decode_init(AVCodecContext * avctx) · 285 unmodified lines
286 }286 }
287 287
288 s->decode_buffer = av_mallocz(sizeof(int32_t)*s->frame_length*s->channels);288 s->decode_buffer = av_mallocz(sizeof(int32_t)*s->frame_length*s->channels);
289 if (!s->decode_buffer)
290 return AVERROR(ENOMEM);
289 s->ch_ctx = av_malloc(avctx->channels * sizeof(*s->ch_ctx));291 s->ch_ctx = av_malloc(avctx->channels * sizeof(*s->ch_ctx));
290 if (!s->ch_ctx)292 if (!s->ch_ctx)
291 return AVERROR(ENOMEM);293 return AVERROR(ENOMEM);

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