History

avcodec/flacdec: fix handling of av_samples_fill_arrays() return value

Michael Niedermayer committed 12 years ago

Commit 6fac4821 parent 70b86681 file · +3 −1Browse files

Unified · Split

libavcodec/flacdec.c+3−1
@@ -130,6 +130,7 @@ static void dump_headers(AVCodecContext *avctx, FLACStreaminfo *s) · 129 unmodified lines
130130 static int allocate_buffers(FLACContext *s)
131131 {
132132 int buf_size;
133+ int ret;
133134
134135 av_assert0(s->max_blocksize);
135136
@@ -142,9 +143,10 @@ static int allocate_buffers(FLACContext *s) · 6 unmodified lines
142143 if (!s->decoded_buffer)
143144 return AVERROR(ENOMEM);
144145
145− return av_samples_fill_arrays((uint8_t **)s->decoded, NULL,
146+ ret = av_samples_fill_arrays((uint8_t **)s->decoded, NULL,
146147 s->decoded_buffer, s->channels,
147148 s->max_blocksize, AV_SAMPLE_FMT_S32P, 0);
149+ return ret < 0 ? ret : 0;
148150 }
149151
150152 /**

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