From 7c23a6f23c185330d74ae4ccce79c3641a2fabac Mon Sep 17 00:00:00 2001 From: Greg Rutz Date: Thu, 7 Nov 2013 10:57:22 -0700 Subject: [PATCH] mpegvparse: Fix last start code position when input buffer is empty When the input buffer is empty and we need more data to determine whether or not to terminate the previous frame, the last start code location needs to be set to 4 bytes before the the current position (size of start_code is 32-bits) https://bugzilla.gnome.org/show_bug.cgi?id=711627 --- gst/videoparsers/gstmpegvideoparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/videoparsers/gstmpegvideoparse.c b/gst/videoparsers/gstmpegvideoparse.c index 79387f3532..2a3c3d2fff 100644 --- a/gst/videoparsers/gstmpegvideoparse.c +++ b/gst/videoparsers/gstmpegvideoparse.c @@ -666,7 +666,7 @@ next: } else { GST_LOG_OBJECT (mpvparse, "need more data"); /* resume scan where we left it */ - mpvparse->last_sc = size - 3; + mpvparse->last_sc = size - 4; /* request best next available */ off = G_MAXUINT; goto exit;