1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2025-02-02 15:07:36 -05:00

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
This commit is contained in:
Karl Heyes 2006-03-15 02:24:57 +00:00
parent 091892c8c6
commit 043bff364c
2 changed files with 10 additions and 7 deletions

View File

@ -93,8 +93,11 @@ static void find_client_start (source_t *source, client_t *client)
{ {
refbuf_t *refbuf = source->burst_point; refbuf_t *refbuf = source->burst_point;
/* we only want to attempt a burst at connection time, not midstream */ /* we only want to attempt a burst at connection time, not midstream
if (client->intro_offset == -1) * 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; refbuf = source->stream_data_tail;
else else
{ {

View File

@ -46,14 +46,14 @@ static refbuf_t *process_flac_page (ogg_state_t *ogg_info, ogg_codec_t *codec, o
{ {
refbuf_t * refbuf; refbuf_t * refbuf;
if (ogg_stream_pagein (&codec->os, page) < 0)
{
ogg_info->error = 1;
return NULL;
}
if (codec->headers) if (codec->headers)
{ {
ogg_packet packet; ogg_packet packet;
if (ogg_stream_pagein (&codec->os, page) < 0)
{
ogg_info->error = 1;
return NULL;
}
while (ogg_stream_packetout (&codec->os, &packet)) while (ogg_stream_packetout (&codec->os, &packet))
{ {
int type = packet.packet[0]; int type = packet.packet[0];