Skip to content
Snippets Groups Projects
Commit b674a278 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Removed useless functions that caused warnings in skeleton.c

parent c7e0b76c
No related branches found
No related tags found
No related merge requests found
......@@ -166,45 +166,7 @@ ogg_packet ogg_from_fisbone(fisbone_packet *fp) {
return op;
}
/* fills up a fishead_packet from a fishead ogg_packet of a skeleton bistream */
fishead_packet fishead_from_ogg(ogg_packet *op) {
fishead_packet fp;
if (memcmp(op->packet, FISHEAD_IDENTIFIER, 8))
; /* invalid packet what do we do? */
fp.version_major = _le_16 (*((ogg_uint16_t*)(op->packet+8))); /* version major */
fp.version_minor = _le_16 (*((ogg_uint16_t*)(op->packet+10))); /* version minor */
fp.ptime_n = _le_64 (*((ogg_int64_t*)(op->packet+12))); /* presentationtime numerator */
fp.ptime_d = _le_64 (*((ogg_int64_t*)(op->packet+20))); /* presentationtime denominator */
fp.btime_n = _le_64 (*((ogg_int64_t*)(op->packet+28))); /* basetime numerator */
fp.btime_d = _le_64 (*((ogg_int64_t*)(op->packet+36))); /* basetime denominator */
memcpy(fp.UTC, op->packet+44, 20);
return fp;
}
/* fills up a fisbone_packet from a fisbone ogg_packet of a skeleton bitstream */
fisbone_packet fisbone_from_ogg(ogg_packet *op) {
fisbone_packet fp;
if (memcmp(op->packet, FISBONE_IDENTIFIER, 8))
; /* invalid value, what do we do? */
fp.serial_no = _le_32 (*((ogg_uint32_t*)(op->packet+12))); /* serialno of the stream represented by this fisbone packet */
fp.nr_header_packet = _le_32 (*((ogg_uint32_t*)(op->packet+16))); /* number of header packets */
fp.granule_rate_n = _le_64 (*((ogg_int64_t*)(op->packet+20))); /* granulrate numerator */
fp.granule_rate_d = _le_64 (*((ogg_int64_t*)(op->packet+28))); /* granulrate denominator */
fp.start_granule = _le_64 (*((ogg_int64_t*)(op->packet+36))); /* start granule */
fp.preroll = _le_32 (*((ogg_uint32_t*)(op->packet+44))); /* preroll, for theora its 0 */
fp.granule_shift = *(op->packet+48); /* granule shift */
fp.current_header_size = op->bytes - FISBONE_SIZE;
fp.message_header_fields = _ogg_calloc(fp.current_header_size+1, sizeof(char));
memcpy(fp.message_header_fields, op->packet+FISBONE_SIZE, fp.current_header_size);
return fp;
}
int add_fishead_to_stream(ogg_stream_state *os, fishead_packet *fp) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment