mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
mpegvideoparse: Handle properly frame detection
Handle the case where we have buffers containing no startcode in the middle of a frame properly.
This commit is contained in:
parent
f396baa3af
commit
df551c0af4
1 changed files with 8 additions and 1 deletions
|
@ -493,9 +493,16 @@ end:
|
|||
} else if (GST_BASE_PARSE_DRAINING (parse)) {
|
||||
*framesize = GST_BUFFER_SIZE (buf);
|
||||
ret = TRUE;
|
||||
|
||||
} else {
|
||||
/* resume scan where we left it */
|
||||
mpvparse->last_sc = GST_BUFFER_SIZE (buf);
|
||||
if (!mpvparse->last_sc)
|
||||
*skipsize = mpvparse->last_sc = GST_BUFFER_SIZE (buf) - 3;
|
||||
else if (mpvparse->typeoffsize)
|
||||
mpvparse->last_sc = GST_BUFFER_SIZE (buf) - 3;
|
||||
else
|
||||
*skipsize = 0;
|
||||
|
||||
/* request best next available */
|
||||
*framesize = G_MAXUINT;
|
||||
ret = FALSE;
|
||||
|
|
Loading…
Reference in a new issue