GNOME Bugzilla – Bug 675156
mpegdemux: the ts demuxer ignores/discards NEWSEGMENT events that are already in time format
Last modified: 2014-02-25 09:25:55 UTC
I've made a push-based source plugin for GStreamer that downloads adaptive streams over HTTP. Basically I fetch the media by piecemeal segments from a web server by giving parameters for time offset and quality layer. Internally the GST plugin uses GST_FORMAT_TIME (the sizes of the individual media segments that will be fetched to make up the viewed stream are not known before they are fetched, so it is meaningless to talk about byte offset into the stream). I discovered that when I use it with decodebin/playbin, seeking didn't work. I traced this back to this module and the fact that it doesn't forward NEWSEGMENT events to its sinks, even though I emit them with correct times in GST_FORMAT_TIME format. This seems like a bug to me. It simply attempts to convert NEWSEGMENT events that are specified in byte format, and ignores/discards the rest. (Perhaps all NEWSEGMENT events that are not in byte format should be forwarded?)
Created attachment 213104 [details] [review] Proposed patch for GST_FORMAT_TIME case I've made this proposed patch to show what I mean in code. With this patch my plugin works, and it is what my company uses internally.
This patch is for the old mpegtsdemux which was not ported to 1.x. Can you check with 1.x ?
Marking as obsolete.