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
pull/126/head
Michael Niedermayer 18 years ago
parent 96e39edc59
commit 0726982cdb
  1. 2
      libavutil/fifo.c

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

Loading…
Cancel
Save