Commit f0e00153 authored by Monty's avatar Monty

Fix for Trac #1578; alter open1 so that serialnos[0] and

vf->current_serialno matches on return.



git-svn-id: https://svn.xiph.org/trunk/Tremor@17572 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent eb57c519
......@@ -910,7 +910,7 @@ static int _ov_open1(void *f,OggVorbis_File *vf,const char *initial,
for second stage of seekable stream open; this saves having to
seek/reread first link's serialnumber data then. */
vf->serialnos=_ogg_calloc(serialno_list_size+2,sizeof(*vf->serialnos));
vf->serialnos[0]=vf->current_serialno;
vf->serialnos[0]=vf->current_serialno=vf->os.serialno;
vf->serialnos[1]=serialno_list_size;
memcpy(vf->serialnos+2,serialno_list,serialno_list_size*sizeof(*vf->serialnos));
......@@ -918,7 +918,6 @@ static int _ov_open1(void *f,OggVorbis_File *vf,const char *initial,
vf->dataoffsets=_ogg_calloc(1,sizeof(*vf->dataoffsets));
vf->offsets[0]=0;
vf->dataoffsets[0]=vf->offset;
vf->current_serialno=vf->os.serialno;
vf->ready_state=PARTOPEN;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment