mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
baseparse: Make sure DISCONT flags are properly propagated
If we drop a frame that contained a discontinuity, we must remember that for the next frame that *will* be pushed downstream. https://bugzilla.gnome.org/show_bug.cgi?id=766795
This commit is contained in:
parent
56b9290073
commit
ea395c2498
1 changed files with 8 additions and 0 deletions
|
@ -2202,6 +2202,12 @@ gst_base_parse_handle_buffer (GstBaseParse * parse, GstBuffer * buffer,
|
||||||
gst_adapter_clear (parse->priv->adapter);
|
gst_adapter_clear (parse->priv->adapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (*skip == 0 && *flushed == 0) {
|
||||||
|
/* Carry over discont if we need more data */
|
||||||
|
if (GST_BUFFER_IS_DISCONT (frame->buffer))
|
||||||
|
parse->priv->discont = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
gst_base_parse_frame_free (frame);
|
gst_base_parse_frame_free (frame);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -2503,6 +2509,8 @@ gst_base_parse_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
||||||
|
|
||||||
if (ret == GST_BASE_PARSE_FLOW_DROPPED) {
|
if (ret == GST_BASE_PARSE_FLOW_DROPPED) {
|
||||||
GST_LOG_OBJECT (parse, "frame (%" G_GSIZE_FORMAT " bytes) dropped", size);
|
GST_LOG_OBJECT (parse, "frame (%" G_GSIZE_FORMAT " bytes) dropped", size);
|
||||||
|
if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT))
|
||||||
|
parse->priv->discont = TRUE;
|
||||||
gst_buffer_unref (buffer);
|
gst_buffer_unref (buffer);
|
||||||
ret = GST_FLOW_OK;
|
ret = GST_FLOW_OK;
|
||||||
} else if (ret == GST_FLOW_OK) {
|
} else if (ret == GST_FLOW_OK) {
|
||||||
|
|
Loading…
Reference in a new issue