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
This commit is contained in:
Greg Rutz 2013-11-07 10:57:22 -07:00 committed by Sebastian Dröge
parent 660979bbf2
commit 7c23a6f23c

View file

@ -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;