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
130static int allocate_buffers(FLACContext *s)130static int allocate_buffers(FLACContext *s)
131{131{
132 int buf_size;132 int buf_size;
133 int ret;
133 134
134 av_assert0(s->max_blocksize);135 av_assert0(s->max_blocksize);
135 136
@@ -142,9 +143,10 @@ static int allocate_buffers(FLACContext *s) · 6 unmodified lines
142 if (!s->decoded_buffer)143 if (!s->decoded_buffer)
143 return AVERROR(ENOMEM);144 return AVERROR(ENOMEM);
144 145
145 return av_samples_fill_arrays((uint8_t **)s->decoded, NULL,146 ret = av_samples_fill_arrays((uint8_t **)s->decoded, NULL,
146 s->decoded_buffer, s->channels,147 s->decoded_buffer, s->channels,
147 s->max_blocksize, AV_SAMPLE_FMT_S32P, 0);148 s->max_blocksize, AV_SAMPLE_FMT_S32P, 0);
149 return ret < 0 ? ret : 0;
148}150}
149 151
150/**152/**

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