[0.10] gst-plugins-bad: h264parse: properly determine skip amount when no NAL start found yet

Tim Müller tpm at kemper.freedesktop.org
Wed Jan 4 10:07:56 PST 2012


Module: gst-plugins-bad
Branch: 0.10
Commit: 7a47ea2c453594d22fd67ce682d051ea1ef43cd7
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=7a47ea2c453594d22fd67ce682d051ea1ef43cd7

Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date:   Tue Jan  3 20:23:16 2012 +0100

h264parse: properly determine skip amount when no NAL start found yet

---

 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 e45c648..f835dc6 100644
--- a/gst/videoparsers/gsth264parse.c
+++ b/gst/videoparsers/gsth264parse.c
@@ -670,7 +670,9 @@ gst_h264_parse_check_valid_frame (GstBaseParse * parse,
         current_off = size - 3;
         goto parsing_error;
       case GST_H264_PARSER_NO_NAL:
-        current_off = size - 3;
+        /* don't expect to have found any NAL so far */
+        g_assert (h264parse->nalu.size == 0);
+        current_off = h264parse->nalu.sc_offset = size - 3;
         goto more;
       case GST_H264_PARSER_BROKEN_DATA:
         GST_WARNING_OBJECT (h264parse, "input stream is corrupt; "



More information about the gstreamer-commits mailing list