Commit 043bff36 authored by Karl Heyes's avatar Karl Heyes

memory leak when handling ogg flac, and make sure that moving listeners

to theora streams triggers a search for a keyframe.

svn path=/icecast/trunk/icecast/; revision=11004
parent 091892c8
......@@ -93,8 +93,11 @@ static void find_client_start (source_t *source, client_t *client)
{
refbuf_t *refbuf = source->burst_point;
/* we only want to attempt a burst at connection time, not midstream */
if (client->intro_offset == -1)
/* we only want to attempt a burst at connection time, not midstream
* however streams like theora may not have the most recent page marked as
* a starting point, so look for one from the burst point */
if (client->intro_offset == -1 && source->stream_data_tail
&& source->stream_data_tail->sync_point)
refbuf = source->stream_data_tail;
else
{
......
......@@ -46,14 +46,14 @@ static refbuf_t *process_flac_page (ogg_state_t *ogg_info, ogg_codec_t *codec, o
{
refbuf_t * refbuf;
if (ogg_stream_pagein (&codec->os, page) < 0)
{
ogg_info->error = 1;
return NULL;
}
if (codec->headers)
{
ogg_packet packet;
if (ogg_stream_pagein (&codec->os, page) < 0)
{
ogg_info->error = 1;
return NULL;
}
while (ogg_stream_packetout (&codec->os, &packet))
{
int type = packet.packet[0];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment