diff options
author | Monty <xiphmont@xiph.org> | 2009-07-11 10:03:10 +0000 |
---|---|---|
committer | Monty <xiphmont@xiph.org> | 2009-07-11 10:03:10 +0000 |
commit | 4ce4ec7859e7f8074341cfb00af1c207f5d24d3f (patch) | |
tree | 90bbcd709f76579ee1da1702f1a39db1c9299d4d /info.c | |
parent | afdecda7fe28e347380e98ca66a00cbbee4cd9f3 (diff) | |
download | tremor-4ce4ec7859e7f8074341cfb00af1c207f5d24d3f.tar.gz |
Merge recent vorbifile changes, extensions and fixes back from
reference 1.2.2 and 1.2.3 into tremor.
git-svn-id: https://svn.xiph.org/trunk/Tremor@16259 0101bb08-14d6-0310-b084-bc0e0c8e3800
Diffstat (limited to 'info.c')
-rw-r--r-- | info.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -293,6 +293,31 @@ static int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){ return(OV_EBADHEADER); } +/* Is this packet a vorbis ID header? */ +int vorbis_synthesis_idheader(ogg_packet *op){ + oggpack_buffer opb; + char buffer[6]; + + if(op){ + oggpack_readinit(&opb,op->packet); + + if(!op->b_o_s) + return(0); /* Not the initial packet */ + + if(oggpack_read(&opb,8) != 1) + return 0; /* not an ID header */ + + memset(buffer,0,6); + _v_readstring(&opb,buffer,6); + if(memcmp(buffer,"vorbis",6)) + return 0; /* not vorbis */ + + return 1; + } + + return 0; +} + /* The Vorbis header is in three packets; the initial small packet in the first page that identifies basic parameters, a second packet with bitstream comments and a third packet that holds the |