diff options
author | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2011-10-06 12:25:26 +0200 |
---|---|---|
committer | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2011-10-06 12:26:23 +0200 |
commit | 9c221f492db412093086b5643abebb65fd0febf3 (patch) | |
tree | 1e281f74c11ea120a563b5c9cc4298f7c71d18aa /gst | |
parent | 3129ea29b1583e83a9548f852f25b08c813c2da5 (diff) |
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.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/videoparsers/gsth264parse.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c index e45ff0c3a..a0e2a8f65 100644 --- a/gst/videoparsers/gsth264parse.c +++ b/gst/videoparsers/gsth264parse.c @@ -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) { |