GNOME Bugzilla – Bug 503023
Let multipartdemux work in live mode.
Last modified: 2007-12-11 11:06:02 UTC
multipartdemux emits buffers with a -1 timestamp. This breaks data from live sources, and downstream elements that need timestamps, e.g. matroskamux. I propose timestamping the buffers with the timestamp of the last buffer that was pushed into the source pad. E.g. a non-live push source: GST_DEBUG="*:3,matroskamux:5,multipartdemux:5" gst-launch -vt souphttpsrc location='http://foo.org/mjpeg?0=0&y0=0&x1=704&y1=576&fps=15' ! multipartdemux ! image/jpeg,width=704,height=576,framerate=15/1 ! typefind ! matroskamux ! filesink location=4cif15fps1.mkv 0:00:00.815873000 24890 0x8124e60 DEBUG multipartdemux multipartdemux.c:533:gst_multipart_demux_chain:<multipartdemux0> pushing buffer with timestamp 99:99:99.999999999 0:00:00.816073000 24890 0x8124e60 WARN matroskamux matroska-mux.c:1732:gst_matroska_mux_write_data:<matroskamux0:video_0> Invalid buffer timestamp; dropping buffer E.g. a live push source: GST_DEBUG="*:3,matroskamux:5,multipartdemux:5" gst-launch -vt souphttpsrc do-timestamp=true location='http://foo.org/mjpeg?0=0&y0=0&x1=704&y1=576&fps=15' ! multipartdemux ! image/jpeg,width=704,height=576,framerate=15/1 ! typefind ! matroskamux ! filesink location=4cif15fps1.mkv 0:00:16.272564000 24248 0x8124e88 DEBUG multipartdemux multipartdemux.c:533:gst_multipart_demux_chain:<multipartdemux0> pushing buffer with timestamp 0:00:15.539441000 0:00:16.272653000 24248 0x8124e88 LOG matroskamux matroska-mux.c:1743:gst_matroska_mux_write_data:<matroskamux0> have video keyframe, ts=0:00:15.539441000
Created attachment 100752 [details] [review] patch to let multipartdemux preserve timestamps
Patch by: Wouter Cloetens <wouter at mind dot be> * gst/multipart/multipartdemux.c: (gst_multipart_demux_chain): Copy timestamp from input to output. Not very perfect yet but better than nothing. Fixes #503023.