GNOME Bugzilla – Bug 340346
[matroskamux] blocks upon muxing video and vorbis-audio
Last modified: 2006-05-03 18:42:38 UTC
Vorbisenc first sends the vorbis packet-headers in buffers with GST_CLOCK_TIME_NONE. This is OK, but the muxing-code in matroskamux (inadvertently) ranks such buffers as "+infinity" in time. As such, audio-data would only be muxed in after all the video has passed.
Created attachment 64639 [details] [review] Possible patch. Patch that changes a few things in matroskamux: - muxing code now selects GST_CLOCK_TIME_NONE before others (not last) (as there should only few such buffers that have to come through) - vorbis headers are dropped from the stream (as they are already retrieved from caps and placed in matroska header), in symmetry with their insertion in matroskademux - matroska clusters are now "better" aligned with keyframes; makes seek happen without complaints from decoder :)
2006-05-03 Tim-Philipp Müller <tim at centricular dot net> Patch by: Mark Nauwelaerts <manauw at skynet be> * gst/matroska/matroska-mux.c: (gst_matroska_mux_best_pad), (gst_matroska_mux_stream_is_vorbis_header), (gst_matroska_mux_write_data): Don't misinterpret GST_CLOCK_TIME_NONE as very high timestamp value and then dead-lock when muxing vorbis audio streams (the three vorbis header buffers carry no timestamp, and it would try to mux these after all video buffers). Fixes #340346. Improve clustering: start a new cluster also whenever we get a keyframe.
Hrm, so apparently this broke 'make check'. Investigating ..
Created attachment 64765 [details] [review] force new clusters only on VIDEO keyframes; don't feed NULL codec_ids to strcmp() This should fix 'make check' again. * the segfault was caused by feeding a NULL string to strcmp(). Not really sure WHY track->codec_id is NULL here, but protecting against it is worthwhile in any case. I attribute it to the test setup ;) * the data size assertion failure was caused by the clustering changes. We forced starting a new cluster whenever the buffer doesn't have the DELTA_UNIT flag set. We really want to do this only for _video_ buffers though, not for audio buffers.
2006-05-03 Tim-Philipp Müller <tim at centricular dot net> * gst/matroska/matroska-mux.c: (gst_matroska_mux_stream_is_vorbis_header), (gst_matroska_mux_write_data): Don't strcmp() NULL strings. Only start new clusters on video keyframes, not on any random audio buffer that doesn't have the DELTA_UNIT flag set (fixes 'make check' again).