gst-plugins-bad: h264parse: some more proper parse state reset
Mark Nauwelaerts
mnauw at kemper.freedesktop.org
Tue Jan 3 11:30:49 PST 2012
Module: gst-plugins-bad
Branch: master
Commit: c54144cc16849907dc5a73b0e671d3c272c5c7ae
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=c54144cc16849907dc5a73b0e671d3c272c5c7ae
Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date: Tue Jan 3 20:21:51 2012 +0100
h264parse: some more proper parse state reset
---
gst/videoparsers/gsth264parse.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c
index 840cfb2..38561bf 100644
--- a/gst/videoparsers/gsth264parse.c
+++ b/gst/videoparsers/gsth264parse.c
@@ -179,6 +179,7 @@ gst_h264_parse_reset_frame (GstH264Parse * h264parse)
/* done parsing; reset state */
h264parse->nalu.valid = FALSE;
h264parse->nalu.offset = 0;
+ h264parse->nalu.sc_offset = 0;
h264parse->nalu.size = 0;
h264parse->current_off = 0;
@@ -617,7 +618,7 @@ gst_h264_parse_check_valid_frame (GstBaseParse * parse,
guint size, current_off = 0;
gboolean drain;
GstH264NalParser *nalparser = h264parse->nalparser;
- GstH264NalUnit nalu = h264parse->nalu;
+ GstH264NalUnit nalu;
/* expect at least 3 bytes startcode == sc, and 2 bytes NALU payload */
if (G_UNLIKELY (GST_BUFFER_SIZE (buffer) < 5))
@@ -640,6 +641,7 @@ gst_h264_parse_check_valid_frame (GstBaseParse * parse,
size = GST_BUFFER_SIZE (buffer);
drain = FALSE;
+ nalu = h264parse->nalu;
current_off = h264parse->current_off;
GST_DEBUG_OBJECT (h264parse, "last parse position %u", current_off);
More information about the gstreamer-commits
mailing list