From 6e7b0d60611aad3350a738fec6995731bd512ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 14 May 2018 21:06:55 +0300 Subject: [PATCH] qtmux: Print expected/actual values in debug log on mismatch in prefill mode This helps debugging a lot. --- gst/isomp4/gstqtmux.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c index 3b4c3d1d56..be0fb171cd 100644 --- a/gst/isomp4/gstqtmux.c +++ b/gst/isomp4/gstqtmux.c @@ -4200,6 +4200,21 @@ gst_qt_mux_register_and_push_sample (GstQTMux * qtmux, GstQTPad * pad, GST_ELEMENT_ERROR (qtmux, STREAM, MUX, (NULL), ("Unexpected values in sample %" G_GUINT64_FORMAT, pad->sample_offset + 1)); + GST_ERROR_OBJECT (qtmux, "Expected: samples %u, delta %u, size %u, " + "chunk offset %" G_GUINT64_FORMAT ", " + "pts offset %" G_GUINT64_FORMAT ", sync %d", + sample_entry->nsamples, + sample_entry->delta, + sample_entry->size, + sample_entry->chunk_offset, + sample_entry->pts_offset, sample_entry->sync); + GST_ERROR_OBJECT (qtmux, "Got: samples %u, delta %u, size %u, " + "chunk offset %" G_GUINT64_FORMAT ", " + "pts offset %" G_GUINT64_FORMAT ", sync %d", + nsamples, + (guint) scaled_duration, + sample_size, chunk_offset, pts_offset, sync); + gst_buffer_unref (buffer); return GST_FLOW_ERROR; }