[xiph-commits] r11004 - icecast/trunk/icecast/src
karl at svn.xiph.org
karl at svn.xiph.org
Tue Mar 14 18:25:01 PST 2006
Author: karl
Date: 2006-03-14 18:24:57 -0800 (Tue, 14 Mar 2006)
New Revision: 11004
Modified:
icecast/trunk/icecast/src/format.c
icecast/trunk/icecast/src/format_flac.c
Log:
memory leak when handling ogg flac, and make sure that moving listeners
to theora streams triggers a search for a keyframe.
Modified: icecast/trunk/icecast/src/format.c
===================================================================
--- icecast/trunk/icecast/src/format.c 2006-03-15 02:21:04 UTC (rev 11003)
+++ icecast/trunk/icecast/src/format.c 2006-03-15 02:24:57 UTC (rev 11004)
@@ -93,8 +93,11 @@
{
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
{
Modified: icecast/trunk/icecast/src/format_flac.c
===================================================================
--- icecast/trunk/icecast/src/format_flac.c 2006-03-15 02:21:04 UTC (rev 11003)
+++ icecast/trunk/icecast/src/format_flac.c 2006-03-15 02:24:57 UTC (rev 11004)
@@ -46,14 +46,14 @@
{
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];
More information about the commits
mailing list