mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 13:02:29 +00:00
h264parse: properly interpret baseparse draining state
... which means the input data has reached the end, but need not exclude many separate frames may still need parsing. Fixes merging NALs into AU.
This commit is contained in:
parent
3129ea29b1
commit
9c221f492d
1 changed files with 4 additions and 3 deletions
|
@ -613,7 +613,7 @@ gst_h264_parse_check_valid_frame (GstBaseParse * parse,
|
|||
data = GST_BUFFER_DATA (buffer);
|
||||
size = GST_BUFFER_SIZE (buffer);
|
||||
|
||||
drain = GST_BASE_PARSE_DRAINING (parse);
|
||||
drain = FALSE;
|
||||
current_off = h264parse->current_off;
|
||||
|
||||
GST_DEBUG_OBJECT (h264parse, "last parse position %u", current_off);
|
||||
|
@ -665,8 +665,9 @@ gst_h264_parse_check_valid_frame (GstBaseParse * parse,
|
|||
if (!h264parse->nalu.size && !h264parse->nalu.valid)
|
||||
h264parse->nalu = nalu;
|
||||
|
||||
if (drain) {
|
||||
GST_DEBUG_OBJECT (h264parse, "drainning NAL %u %u %u", size,
|
||||
if (GST_BASE_PARSE_DRAINING (parse)) {
|
||||
drain = TRUE;
|
||||
GST_DEBUG_OBJECT (h264parse, "draining NAL %u %u %u", size,
|
||||
h264parse->nalu.offset, h264parse->nalu.size);
|
||||
/* Can't parse the nalu */
|
||||
if (size - h264parse->nalu.offset < 2) {
|
||||
|
|
Loading…
Reference in a new issue