diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c index 459d954c07..9fc05dc80c 100644 --- a/ext/flac/gstflacdec.c +++ b/ext/flac/gstflacdec.c @@ -428,29 +428,28 @@ gst_flacdec_write (const FLAC__SeekableStreamDecoder *decoder, GstEvent *discont; flacdec->need_discont = FALSE; - - if (!GST_PAD_CAPS (flacdec->srcpad)) { - if (flacdec->seek_pending) { - flacdec->total_samples = flacdec->seek_value; - } + if (flacdec->seek_pending) { + flacdec->total_samples = flacdec->seek_value; + } - if (GST_PAD_IS_USABLE (flacdec->srcpad)) { - GST_DEBUG (0, "send discont"); + if (GST_PAD_IS_USABLE (flacdec->srcpad)) { + GST_DEBUG (0, "send discont"); - format = GST_FORMAT_TIME; - gst_pad_convert (flacdec->srcpad, GST_FORMAT_DEFAULT, - flacdec->total_samples, &format, &time); - format = GST_FORMAT_BYTES; - gst_pad_convert (flacdec->srcpad, GST_FORMAT_DEFAULT, - flacdec->total_samples, &format, &bytes); - discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME, time, - GST_FORMAT_BYTES, bytes, + format = GST_FORMAT_TIME; + gst_pad_convert (flacdec->srcpad, GST_FORMAT_DEFAULT, + flacdec->total_samples, &format, &time); + format = GST_FORMAT_BYTES; + gst_pad_convert (flacdec->srcpad, GST_FORMAT_DEFAULT, + flacdec->total_samples, &format, &bytes); + discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME, time, + GST_FORMAT_BYTES, bytes, GST_FORMAT_DEFAULT, flacdec->total_samples, NULL); - gst_pad_push (flacdec->srcpad, GST_BUFFER (discont)); + gst_pad_push (flacdec->srcpad, GST_BUFFER (discont)); + } } } @@ -771,4 +770,3 @@ gst_flacdec_get_property (GObject *object, guint prop_id, g_warning ("Unknown property id\n"); } } -