diff options
author | Magnus Holmgren <magnushol@gmail.com> | 2009-07-13 15:23:07 +0000 |
---|---|---|
committer | Magnus Holmgren <magnushol@gmail.com> | 2009-07-13 15:23:07 +0000 |
commit | 5e2f11ad655051296b64af86b33a8bbb0229272b (patch) | |
tree | cd696153542e7a19056e8b23aeda9d0b1b6bc3d6 /apps/codecs/libtremor/info.c | |
parent | 23ea8a53a10977b53e926665f44d0d3810552575 (diff) | |
download | rockbox-5e2f11ad655051296b64af86b33a8bbb0229272b.tar.gz rockbox-5e2f11ad655051296b64af86b33a8bbb0229272b.zip |
Import Vorbis seeking improvements from Tremor SVN.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21841 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libtremor/info.c')
-rw-r--r-- | apps/codecs/libtremor/info.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/apps/codecs/libtremor/info.c b/apps/codecs/libtremor/info.c index cb3860bbff..4273f97dc1 100644 --- a/apps/codecs/libtremor/info.c +++ b/apps/codecs/libtremor/info.c | |||
@@ -232,6 +232,31 @@ static int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){ | |||
232 | return(OV_EBADHEADER); | 232 | return(OV_EBADHEADER); |
233 | } | 233 | } |
234 | 234 | ||
235 | /* Is this packet a vorbis ID header? */ | ||
236 | int vorbis_synthesis_idheader(ogg_packet *op){ | ||
237 | oggpack_buffer opb; | ||
238 | char buffer[6]; | ||
239 | |||
240 | if(op){ | ||
241 | oggpack_readinit(&opb,op->packet); | ||
242 | |||
243 | if(!op->b_o_s) | ||
244 | return(0); /* Not the initial packet */ | ||
245 | |||
246 | if(oggpack_read(&opb,8) != 1) | ||
247 | return 0; /* not an ID header */ | ||
248 | |||
249 | memset(buffer,0,6); | ||
250 | _v_readstring(&opb,buffer,6); | ||
251 | if(memcmp(buffer,"vorbis",6)) | ||
252 | return 0; /* not vorbis */ | ||
253 | |||
254 | return 1; | ||
255 | } | ||
256 | |||
257 | return 0; | ||
258 | } | ||
259 | |||
235 | /* The Vorbis header is in three packets; the initial small packet in | 260 | /* The Vorbis header is in three packets; the initial small packet in |
236 | the first page that identifies basic parameters, a second packet | 261 | the first page that identifies basic parameters, a second packet |
237 | with bitstream comments and a third packet that holds the | 262 | with bitstream comments and a third packet that holds the |