encoder/ogg: use class OggStreamState

This commit is contained in:
Max Kellermann
2016-05-09 14:13:45 +02:00
parent d04eb87c4f
commit 068de7cf40
3 changed files with 32 additions and 14 deletions

View File

@@ -244,7 +244,7 @@ OpusEncoder::DoEncode(bool eos, Error &error)
bool
OpusEncoder::End(Error &error)
{
stream.Flush();
Flush();
memset(buffer + buffer_position, 0,
buffer_size - buffer_position);
@@ -331,7 +331,7 @@ OpusEncoder::GenerateHead()
packet.granulepos = 0;
packet.packetno = packetno++;
stream.PacketIn(packet);
stream.Flush();
Flush();
}
void
@@ -355,7 +355,7 @@ OpusEncoder::GenerateTags()
packet.granulepos = 0;
packet.packetno = packetno++;
stream.PacketIn(packet);
stream.Flush();
Flush();
free(comments);
}