[0.11] gst-plugins-good: isomp4: Fix allowing zero duration tracks
Wim Taymans
wtay at kemper.freedesktop.org
Wed Sep 28 03:45:29 PDT 2011
Module: gst-plugins-good
Branch: 0.11
Commit: 056e9188b13644aa1ed81216860c290f6e8ab864
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=056e9188b13644aa1ed81216860c290f6e8ab864
Author: Lasse Laukkanen <lasse.laukkanen at digia.com>
Date: Fri Sep 16 16:53:22 2011 +0300
isomp4: Fix allowing zero duration tracks
https://bugzilla.gnome.org/show_bug.cgi?id=637486
---
gst/isomp4/gstqtmux.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c
index c6f2b4b..55b3f6b 100644
--- a/gst/isomp4/gstqtmux.c
+++ b/gst/isomp4/gstqtmux.c
@@ -1738,15 +1738,25 @@ gst_qt_mux_stop_file (GstQTMux * qtmux)
GstCollectData *cdata = (GstCollectData *) walk->data;
GstQTPad *qtpad = (GstQTPad *) cdata;
- /* send last buffer */
+ /* avoid add_buffer complaining if not negotiated
+ * in which case no buffers either, so skipping */
+ if (!qtpad->fourcc) {
+ GST_DEBUG_OBJECT (qtmux, "Pad %s has never had buffers",
+ GST_PAD_NAME (qtpad->collect.pad));
+ continue;
+ }
+
+ /* send last buffer; also flushes possibly queued buffers/ts */
GST_DEBUG_OBJECT (qtmux, "Sending the last buffer for pad %s",
GST_PAD_NAME (qtpad->collect.pad));
ret = gst_qt_mux_add_buffer (qtmux, qtpad, NULL);
- if (ret != GST_FLOW_OK)
+ if (ret != GST_FLOW_OK) {
GST_WARNING_OBJECT (qtmux, "Failed to send last buffer for %s, "
"flow return: %s", GST_PAD_NAME (qtpad->collect.pad),
gst_flow_get_name (ret));
+ }
+ /* having flushed above, can check for buffers now */
if (!GST_CLOCK_TIME_IS_VALID (qtpad->first_ts)) {
GST_DEBUG_OBJECT (qtmux, "Pad %s has no buffers",
GST_PAD_NAME (qtpad->collect.pad));
More information about the gstreamer-commits
mailing list