mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
codecparsers: vc1: handle End-of-Sequence correctly.
This commit is contained in:
parent
c90bf89b16
commit
bd686a6370
1 changed files with 8 additions and 2 deletions
|
@ -1200,8 +1200,8 @@ gst_vc1_identify_next_bdu (const guint8 * data, gsize size, GstVC1BDU * bdu)
|
||||||
|
|
||||||
ensure_debug_category ();
|
ensure_debug_category ();
|
||||||
|
|
||||||
if (size <= 4) {
|
if (size < 4) {
|
||||||
GST_DEBUG ("Can't parse, buffer is to small size %" G_GSSIZE_FORMAT, size);
|
GST_DEBUG ("Can't parse, buffer has too small size %" G_GSSIZE_FORMAT, size);
|
||||||
return GST_VC1_PARSER_ERROR;
|
return GST_VC1_PARSER_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1218,6 +1218,12 @@ gst_vc1_identify_next_bdu (const guint8 * data, gsize size, GstVC1BDU * bdu)
|
||||||
bdu->data = (guint8 *) data;
|
bdu->data = (guint8 *) data;
|
||||||
bdu->type = (GstVC1StartCode) (data[bdu->offset - 1]);
|
bdu->type = (GstVC1StartCode) (data[bdu->offset - 1]);
|
||||||
|
|
||||||
|
if (bdu->type == GST_VC1_END_OF_SEQ) {
|
||||||
|
GST_DEBUG ("End-of-Sequence BDU found");
|
||||||
|
bdu->size = 0;
|
||||||
|
return GST_VC1_PARSER_OK;
|
||||||
|
}
|
||||||
|
|
||||||
off2 = scan_for_start_codes (data + bdu->offset, size - bdu->offset);
|
off2 = scan_for_start_codes (data + bdu->offset, size - bdu->offset);
|
||||||
if (off2 < 0) {
|
if (off2 < 0) {
|
||||||
GST_DEBUG ("Bdu start %d, No end found", bdu->offset);
|
GST_DEBUG ("Bdu start %d, No end found", bdu->offset);
|
||||||
|
|
Loading…
Reference in a new issue