summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Terriberry <tterribe@xiph.org>2011-11-06 14:36:14 +0000
committerTim Terriberry <tterribe@xiph.org>2011-11-06 14:36:14 +0000
commitb7d73020afa7ea75378f7537fab6a250bdf64c20 (patch)
tree48ea409c6fead01fa42c39665a8ecc10d831d781
parentc7b26d137a0baf8a545ca9e108310e7c6febf84d (diff)
downloadtremor-b7d73020afa7ea75378f7537fab6a250bdf64c20.tar.gz
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
-rw-r--r--vorbisfile.c8
1 files 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_state<STREAMSET){
if(vf->seekable){
- 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_state<STREAMSET){
int link;
- long serialno = ogg_page_serialno(&og);
+ ogg_uint32_t serialno = ogg_page_serialno(&og);
for(link=0;link<vf->links;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_state<STREAMSET){
- long serialno=ogg_page_serialno(&og);
+ ogg_uint32_t serialno=ogg_page_serialno(&og);
int link;
for(link=0;link<vf->links;link++)