From 160207abb908b03cc4dbd3cafac083e8de0d9725 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Tue, 21 Jun 2011 12:41:47 +0200 Subject: [PATCH] h264parse: avoid bogus frame parsing state --- gst/videoparsers/gsth264parse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c index d5b539e427..f8b403eb42 100644 --- a/gst/videoparsers/gsth264parse.c +++ b/gst/videoparsers/gsth264parse.c @@ -507,6 +507,8 @@ gst_h264_parse_check_valid_frame (GstBaseParse * parse, if (sc_pos == -1) { /* SC not found, need more data */ sc_pos = GST_BUFFER_SIZE (buffer) - 3; + /* avoid going < 0 later on */ + nal_pos = next_sc_pos = sc_pos; goto more; }