mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
videodecoder: Make sure the DISCONT flag is set on the outgoing buffer
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
This commit is contained in:
parent
bd49854c32
commit
fb21fc3af1
1 changed files with 7 additions and 1 deletions
|
@ -3071,7 +3071,6 @@ gst_video_decoder_finish_frame (GstVideoDecoder * decoder,
|
||||||
|
|
||||||
if (priv->discont) {
|
if (priv->discont) {
|
||||||
GST_BUFFER_FLAG_SET (output_buffer, GST_BUFFER_FLAG_DISCONT);
|
GST_BUFFER_FLAG_SET (output_buffer, GST_BUFFER_FLAG_DISCONT);
|
||||||
priv->discont = FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (decoder_class->transform_meta) {
|
if (decoder_class->transform_meta) {
|
||||||
|
@ -3189,6 +3188,13 @@ gst_video_decoder_clip_and_push_buf (GstVideoDecoder * decoder, GstBuffer * buf)
|
||||||
goto done;
|
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 */
|
/* update rate estimate */
|
||||||
priv->bytes_out += gst_buffer_get_size (buf);
|
priv->bytes_out += gst_buffer_get_size (buf);
|
||||||
if (GST_CLOCK_TIME_IS_VALID (duration)) {
|
if (GST_CLOCK_TIME_IS_VALID (duration)) {
|
||||||
|
|
Loading…
Reference in a new issue