The base class was setting the DISCONT flag before checking whether the buffer
would be in segment or not.
Fix issues with DISCONT flags not being properly propagated downstream when
decoders buffers were out of segment.
https://bugzilla.gnome.org/show_bug.cgi?id=766800
if (priv->discont) {
GST_BUFFER_FLAG_SET (output_buffer, GST_BUFFER_FLAG_DISCONT);
- priv->discont = FALSE;
}
if (decoder_class->transform_meta) {
goto done;
}
+ /* Set DISCONT flag here ! */
+ if (priv->discont) {
+ GST_DEBUG_OBJECT (decoder, "Setting discont on output buffer");
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT);
+ priv->discont = FALSE;
+ }
+
/* update rate estimate */
priv->bytes_out += gst_buffer_get_size (buf);
if (GST_CLOCK_TIME_IS_VALID (duration)) {