mirror of
https://github.com/fmang/opustags.git
synced 2025-01-16 05:03:13 +01:00
read all the packets
This commit is contained in:
parent
7f3d1b1367
commit
caf418b6a5
@ -151,13 +151,14 @@ int main(int argc, char **argv){
|
||||
error = "ogg_stream_pagein: invalid page";
|
||||
break;
|
||||
}
|
||||
if(ogg_stream_packetout(&os, &op) == 1){
|
||||
// Read all the packets.
|
||||
while(ogg_stream_packetout(&os, &op) == 1){
|
||||
packet_count++;
|
||||
if(packet_count == 1){ // Identification header
|
||||
if(strncmp((char*) op.packet, "OpusHead", 8) != 0)
|
||||
error = "opustags: invalid identification header";
|
||||
}
|
||||
if(packet_count == 2){ // Comment header
|
||||
else if(packet_count == 2){ // Comment header
|
||||
if(parse_tags((char*) op.packet, op.bytes, &tags) == -1)
|
||||
error = "opustags: invalid comment header";
|
||||
// DEBUG
|
||||
|
Loading…
x
Reference in New Issue
Block a user