1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

better to set things to NULL instead of random in case of out of mem

Originally committed as revision 7572 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2007-01-17 20:06:38 +00:00
parent 96e39edc59
commit 0726982cdb

View File

@ -24,11 +24,11 @@
int av_fifo_init(AVFifoBuffer *f, int size) int av_fifo_init(AVFifoBuffer *f, int size)
{ {
f->wptr = f->rptr =
f->buffer = av_malloc(size); f->buffer = av_malloc(size);
if (!f->buffer) if (!f->buffer)
return -1; return -1;
f->end = f->buffer + size; f->end = f->buffer + size;
f->wptr = f->rptr = f->buffer;
return 0; return 0;
} }