GNOME Bugzilla – Bug 637927
oggdemux: set headers on caps
Last modified: 2010-12-25 15:55:45 UTC
This will allow a decoder to initialize itself 'on the fly' in the middle of a stream, without having to be sent headers. This can happen when switching subtitle tracks in Totem, for instance.
Created attachment 176995 [details] [review] oggdemux: set headers on caps This will allow switching from one stream to another without having to send the headers for the new stream again.
Review of attachment 176995 [details] [review]: Good patch, just two really minor things :) ::: ext/ogg/gstoggdemux.c @@ +1741,3 @@ + GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_IN_CAPS); + g_value_init (&value, GST_TYPE_BUFFER); + gst_value_set_buffer (&value, buffer); You could use gst_value_take_buffer() here to prevent copying the data twice @@ +1842,3 @@ + /* Set headers on caps */ + caps = gst_caps_copy (pad->map.caps); Just use gst_caps_make_writable() here and change the mapper caps inplace
(In reply to comment #2) > ::: ext/ogg/gstoggdemux.c > @@ +1741,3 @@ > + GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_IN_CAPS); > + g_value_init (&value, GST_TYPE_BUFFER); > + gst_value_set_buffer (&value, buffer); > > You could use gst_value_take_buffer() here to prevent copying the data twice Of course this is wrong (the copying) and really doesn't matter here
Created attachment 177015 [details] [review] oggdemux: set headers on caps This will allow switching from one stream to another without having to send the headers for the new stream again.
commit dd135119d929ce60c2a2594b51cd3db0e47a6b73 Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Thu Dec 23 17:18:17 2010 +0000 oggdemux: set headers on caps This will allow switching from one stream to another without having to send the headers for the new stream again. https://bugzilla.gnome.org/show_bug.cgi?id=637927