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
@ -493,9 +493,16 @@ end:
|
|||||||
} else if (GST_BASE_PARSE_DRAINING (parse)) {
|
} else if (GST_BASE_PARSE_DRAINING (parse)) {
|
||||||
*framesize = GST_BUFFER_SIZE (buf);
|
*framesize = GST_BUFFER_SIZE (buf);
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* resume scan where we left it */
|
/* 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 */
|
/* request best next available */
|
||||||
*framesize = G_MAXUINT;
|
*framesize = G_MAXUINT;
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user