From b7d73020afa7ea75378f7537fab6a250bdf64c20 Mon Sep 17 00:00:00 2001 From: Tim Terriberry Date: Sun, 6 Nov 2011 14:36:14 +0000 Subject: Fix mis-matched types for serialno's. The use of long caused some functions which now use libogg's ogg_page_serialno() (which returns an int) to sign-extend the serialno, while the actual list was stored as ogg_uint32_t's. This would cause subsequent lookups to fail on platforms with a 64-bit long. Introduced in r17375 and r16259, but only partially corrected in r17536. Fixes #1838. Thanks to achurch for the report. git-svn-id: https://svn.xiph.org/trunk/Tremor@18116 0101bb08-14d6-0310-b084-bc0e0c8e3800 --- vorbisfile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vorbisfile.c b/vorbisfile.c index c7afdb9..ac0eb88 100644 --- a/vorbisfile.c +++ b/vorbisfile.c @@ -181,7 +181,7 @@ static ogg_int64_t _get_prev_page(OggVorbis_File *vf,ogg_page *og){ } static void _add_serialno(ogg_page *og,ogg_uint32_t **serialno_list, int *n){ - long s = ogg_page_serialno(og); + ogg_uint32_t s = ogg_page_serialno(og); (*n)++; if(*serialno_list){ @@ -820,7 +820,7 @@ static int _fetch_and_process_packet(OggVorbis_File *vf, if(vf->ready_stateseekable){ - long serialno = ogg_page_serialno(&og); + ogg_uint32_t serialno = ogg_page_serialno(&og); /* match the serialno to bitstream section. We use this rather than offset positions to avoid problems near logical bitstream @@ -1315,7 +1315,7 @@ int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos){ if(vf->ready_statelinks;link++) if(vf->serialnos[link]==serialno)break; @@ -1627,7 +1627,7 @@ int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos){ if(ogg_page_bos(&og))_decode_clear(vf); if(vf->ready_statelinks;link++) -- cgit v1.2.1