[PATCH] Prevent Icecast from barfing on Vorbis+Skeleton

View: New views
3 Messages — Rating Filter:   Alert me  

[PATCH] Prevent Icecast from barfing on Vorbis+Skeleton

by Saoshyant :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is a patch that resulted from a discussion in the Theora list.
More information below.

On 11/7/08, Romain Beauxis <toots@...> wrote:
> I have implemented skeleton in our encoder.
> Do you know what to do with vorbis only streams ?
>
> In particular, vorbis streams with skeleton do not seem to work with
> icecast..

On 11/12/08, ogg.k.ogg.k@... <ogg.k.ogg.k@...> wrote:
> Fixed, attached.
> I'm not sure this fix is optimal though: if there's no sync point,
> it sends everything. That's the reason the stream was blocking
> on skeleton.
> Tested with libshout's example.c and XMMS.

Please review it.

-Ivo

[icecast-skeleton.diff]

diff -ru /mnt/dvd/svn/xiph/icecast/src/format.c ./src/format.c
--- /mnt/dvd/svn/xiph/icecast/src/format.c 2008-09-12 11:55:46.000000000 +0100
+++ ./src/format.c 2008-11-11 18:46:33.000000000 +0000
@@ -98,6 +98,7 @@
 static void find_client_start (source_t *source, client_t *client)
 {
     refbuf_t *refbuf = source->burst_point;
+    refbuf_t *refbuf_start;
 
     /* 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
@@ -116,6 +117,7 @@
         }
     }
 
+    refbuf_start = refbuf;
     while (refbuf)
     {
         if (refbuf->sync_point)
@@ -128,6 +130,15 @@
         }
         refbuf = refbuf->next;
     }
+
+    if (!refbuf)
+    {
+        DEBUG0("good sync point not found, starting anywhere anyway");
+        client_set_queue (client, refbuf_start);
+        client->check_buffer = format_advance_queue;
+        client->write_to_client = source->format->write_buf_to_client;
+        client->intro_offset = -1;
+    }
 }
 
 


_______________________________________________
Icecast-dev mailing list
Icecast-dev@...
http://lists.xiph.org/mailman/listinfo/icecast-dev

Parent Message unknown Re: [PATCH] Prevent Icecast from barfing on Vorbis+Skeleton

by ogg.k.ogg.k@googlemail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> checking over the code again, I see that skeleton was taking control on
> the sync markers but not marking any of the buffers as such. how about
> the attached?.

Sure, I had not realized setting this pointer was telling Icecast to have
this behavior. I haven't hacked much on Icecast, and have a very hazy
view of its internals. This seems like a better fix.
_______________________________________________
Icecast-dev mailing list
Icecast-dev@...
http://lists.xiph.org/mailman/listinfo/icecast-dev

Re: [PATCH] Prevent Icecast from barfing on Vorbis+Skeleton

by Saoshyant :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I took the liberty of committing Karl's patch in r15529[1].

Thanks Karl and ogg.k.ogg.k.

-Ivo

[1] https://trac.xiph.org/changeset/15529
_______________________________________________
Icecast-dev mailing list
Icecast-dev@...
http://lists.xiph.org/mailman/listinfo/icecast-dev