diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index 6e0d86f5a0..957dea1d27 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -3071,7 +3071,6 @@ gst_video_decoder_finish_frame (GstVideoDecoder * decoder, if (priv->discont) { GST_BUFFER_FLAG_SET (output_buffer, GST_BUFFER_FLAG_DISCONT); - priv->discont = FALSE; } if (decoder_class->transform_meta) { @@ -3189,6 +3188,13 @@ gst_video_decoder_clip_and_push_buf (GstVideoDecoder * decoder, GstBuffer * buf) 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)) {