comparison libmpdemux/demux_ogg.c @ 11464:1efd0f9a946d

For FLAC-in-Ogg the packets are NEVER skipped, and there's no such thing as a "packet header byte" like in Ogm streams. Basically the handling for Vorbis != Theora != FLAC != Ogm.
author mosu
date Sat, 15 Nov 2003 20:00:31 +0000
parents db9ced943496
children d3fc1feb652a
comparison
equal deleted inserted replaced
11463:d379e392a132 11464:1efd0f9a946d
406 demux_ogg_add_sub(os,pack); 406 demux_ogg_add_sub(os,pack);
407 return 0; 407 return 0;
408 } 408 }
409 // If packet is an header we jump it except for vorbis and theora 409 // If packet is an header we jump it except for vorbis and theora
410 // (PACKET_TYPE_HEADER bit doesn't even exist for theora ?!) 410 // (PACKET_TYPE_HEADER bit doesn't even exist for theora ?!)
411 if((*pack->packet & PACKET_TYPE_HEADER) && 411 // We jump nothing for FLAC. Ain't this great? Packet contents have to be
412 // handled differently for each and every stream type. The joy! The joy!
413 if(!os->flac && ((*pack->packet & PACKET_TYPE_HEADER) &&
412 (ds != d->audio || ( ((sh_audio_t*)ds->sh)->format != 0xFFFE || os->hdr_packets >= NUM_VORBIS_HDR_PACKETS ) ) && 414 (ds != d->audio || ( ((sh_audio_t*)ds->sh)->format != 0xFFFE || os->hdr_packets >= NUM_VORBIS_HDR_PACKETS ) ) &&
413 (ds != d->video || (((sh_video_t*)ds->sh)->format != 0xFFFC))) 415 (ds != d->video || (((sh_video_t*)ds->sh)->format != 0xFFFC))))
414 return 0; 416 return 0;
415 417
416 // For vorbis packet the packet is the data, for other codec we must jump 418 // For vorbis packet the packet is the data, for other codec we must jump
417 // the header 419 // the header
418 if(ds == d->audio && ((sh_audio_t*)ds->sh)->format == 0xFFFE) 420 if(ds == d->audio && ((sh_audio_t*)ds->sh)->format == 0xFFFE)