mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
av1parse: Only place a marker on the last frame of a TU
Markers are meant to indicate the buffer that ends a frame, which imply something can be displayed. The dependent decode only frames should not have markers. This should also fix last subframe detection. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6895>
This commit is contained in:
parent
5fe7803128
commit
5b1bc0f19f
1 changed files with 12 additions and 7 deletions
|
@ -1117,20 +1117,25 @@ gst_av1_parse_push_data (GstAV1Parse * self, GstBaseParseFrame * frame,
|
|||
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
|
||||
}
|
||||
|
||||
if (frame_finished) {
|
||||
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_MARKER);
|
||||
} else {
|
||||
GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_MARKER);
|
||||
}
|
||||
|
||||
if (self->align == GST_AV1_PARSE_ALIGN_FRAME) {
|
||||
if (self->align == GST_AV1_PARSE_ALIGN_FRAME
|
||||
|| self->align == GST_AV1_PARSE_ALIGN_OBU) {
|
||||
if (!self->show_frame) {
|
||||
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DECODE_ONLY);
|
||||
} else {
|
||||
GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DECODE_ONLY);
|
||||
if (frame_finished) {
|
||||
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_MARKER);
|
||||
} else {
|
||||
GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_MARKER);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DECODE_ONLY);
|
||||
if (frame_finished) {
|
||||
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_MARKER);
|
||||
} else {
|
||||
GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_MARKER);
|
||||
}
|
||||
}
|
||||
|
||||
gst_buffer_replace (&frame->out_buffer, buf);
|
||||
|
|
Loading…
Reference in a new issue