Mercurial > libavformat.hg
changeset 1133:554cc16341da libavformat
10l: don't allocate a new buffer quite so often
author | mru |
---|---|
date | Sun, 25 Jun 2006 12:23:54 +0000 |
parents | a5487f44bbfa |
children | 19ceddeafe2e |
files | ogg2.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ogg2.c Sun Jun 25 00:41:13 2006 +0000 +++ b/ogg2.c Sun Jun 25 12:23:54 2006 +0000 @@ -193,6 +193,7 @@ os = ogg->streams + idx; os->serial = serial; os->bufsize = DECODER_BUFFER_SIZE; + os->buf = av_malloc(os->bufsize); os->header = -1; st = av_new_stream (s, idx); @@ -279,7 +280,7 @@ os = ogg->streams + idx; - if(os->segp == os->nsegs) + if(os->psize > 0) ogg_new_buf(ogg, idx); if (get_buffer (bc, os->segments, nsegs) < nsegs)