mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
baesparse: fix refactor regression in loop based parsing
This commit is contained in:
parent
9d9d9beb04
commit
d9def3d05d
1 changed files with 9 additions and 7 deletions
|
@ -2236,9 +2236,15 @@ gst_base_parse_scan_frame (GstBaseParse * parse, GstBaseParseClass * klass,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fsize <= GST_BUFFER_SIZE (buffer)) {
|
/* Does the subclass want to skip too? */
|
||||||
outbuf = gst_buffer_create_sub (buffer, 0, fsize);
|
if (skip > 0)
|
||||||
GST_BUFFER_OFFSET (outbuf) = GST_BUFFER_OFFSET (buffer);
|
parse->priv->offset += skip;
|
||||||
|
else if (skip < 0)
|
||||||
|
skip = 0;
|
||||||
|
|
||||||
|
if (fsize + skip <= GST_BUFFER_SIZE (buffer)) {
|
||||||
|
outbuf = gst_buffer_create_sub (buffer, skip, fsize);
|
||||||
|
GST_BUFFER_OFFSET (outbuf) = GST_BUFFER_OFFSET (buffer) + skip;
|
||||||
GST_BUFFER_TIMESTAMP (outbuf) = GST_CLOCK_TIME_NONE;
|
GST_BUFFER_TIMESTAMP (outbuf) = GST_CLOCK_TIME_NONE;
|
||||||
gst_buffer_unref (buffer);
|
gst_buffer_unref (buffer);
|
||||||
} else {
|
} else {
|
||||||
|
@ -2254,10 +2260,6 @@ gst_base_parse_scan_frame (GstBaseParse * parse, GstBaseParseClass * klass,
|
||||||
|
|
||||||
parse->priv->offset += fsize;
|
parse->priv->offset += fsize;
|
||||||
|
|
||||||
/* Does the subclass want to skip too? */
|
|
||||||
if (skip > 0)
|
|
||||||
parse->priv->offset += skip;
|
|
||||||
|
|
||||||
*buf = outbuf;
|
*buf = outbuf;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
|
Loading…
Reference in a new issue