summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/flac/gstflacdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c
index 8d4805d2f..3fc99b9b7 100644
--- a/ext/flac/gstflacdec.c
+++ b/ext/flac/gstflacdec.c
@@ -578,7 +578,9 @@ gst_flac_dec_metadata_cb (const FLAC__StreamDecoder * decoder,
GST_DEBUG_OBJECT (flacdec, "total samples = %" G_GINT64_FORMAT, samples);
- if (samples > 0) {
+ /* in framed mode the demuxer/parser upstream has already pushed a
+ * newsegment event in TIME format which we've passed on */
+ if (samples > 0 && !flacdec->framed) {
gint64 duration;
gst_segment_set_duration (&flacdec->segment, GST_FORMAT_DEFAULT,