mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
cccombiner: don't assume a single cea608 data packet per buffer
e.g. 24fps can have up to 3 and would include either two field0 or field1 cea608 data. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3211>
This commit is contained in:
parent
741cfd18b5
commit
5dd199f7e8
1 changed files with 0 additions and 22 deletions
|
@ -486,7 +486,6 @@ schedule_cea608_s334_1a (GstCCCombiner * self, guint8 * data, guint len,
|
||||||
guint8 field0_data[3], field1_data[3];
|
guint8 field0_data[3], field1_data[3];
|
||||||
guint field0_len = 0, field1_len = 0;
|
guint field0_len = 0, field1_len = 0;
|
||||||
guint i;
|
guint i;
|
||||||
gboolean field0_608 = FALSE, field1_608 = FALSE;
|
|
||||||
|
|
||||||
if (len % 3 != 0) {
|
if (len % 3 != 0) {
|
||||||
GST_WARNING ("Invalid cc_data buffer size %u. Truncating to a multiple "
|
GST_WARNING ("Invalid cc_data buffer size %u. Truncating to a multiple "
|
||||||
|
@ -496,11 +495,6 @@ schedule_cea608_s334_1a (GstCCCombiner * self, guint8 * data, guint len,
|
||||||
|
|
||||||
for (i = 0; i < len / 3; i++) {
|
for (i = 0; i < len / 3; i++) {
|
||||||
if (data[i * 3] & 0x80) {
|
if (data[i * 3] & 0x80) {
|
||||||
if (field0_608)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
field0_608 = TRUE;
|
|
||||||
|
|
||||||
if (data[i * 3 + 1] == 0x80 && data[i * 3 + 2] == 0x80)
|
if (data[i * 3 + 1] == 0x80 && data[i * 3 + 2] == 0x80)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -508,11 +502,6 @@ schedule_cea608_s334_1a (GstCCCombiner * self, guint8 * data, guint len,
|
||||||
field0_data[field0_len++] = data[i * 3 + 1];
|
field0_data[field0_len++] = data[i * 3 + 1];
|
||||||
field0_data[field0_len++] = data[i * 3 + 2];
|
field0_data[field0_len++] = data[i * 3 + 2];
|
||||||
} else {
|
} else {
|
||||||
if (field1_608)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
field1_608 = TRUE;
|
|
||||||
|
|
||||||
if (data[i * 3 + 1] == 0x80 && data[i * 3 + 2] == 0x80)
|
if (data[i * 3 + 1] == 0x80 && data[i * 3 + 2] == 0x80)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -550,7 +539,6 @@ schedule_cea708_raw (GstCCCombiner * self, guint8 * data, guint len,
|
||||||
guint8 field0_data[MAX_CDP_PACKET_LEN], field1_data[3];
|
guint8 field0_data[MAX_CDP_PACKET_LEN], field1_data[3];
|
||||||
guint field0_len = 0, field1_len = 0;
|
guint field0_len = 0, field1_len = 0;
|
||||||
guint i;
|
guint i;
|
||||||
gboolean field0_608 = FALSE, field1_608 = FALSE;
|
|
||||||
gboolean started_ccp = FALSE;
|
gboolean started_ccp = FALSE;
|
||||||
|
|
||||||
if (len % 3 != 0) {
|
if (len % 3 != 0) {
|
||||||
|
@ -568,11 +556,6 @@ schedule_cea708_raw (GstCCCombiner * self, guint8 * data, guint len,
|
||||||
if (!cc_valid)
|
if (!cc_valid)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (field0_608)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
field0_608 = TRUE;
|
|
||||||
|
|
||||||
if (data[i * 3 + 1] == 0x80 && data[i * 3 + 2] == 0x80)
|
if (data[i * 3 + 1] == 0x80 && data[i * 3 + 2] == 0x80)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -583,11 +566,6 @@ schedule_cea708_raw (GstCCCombiner * self, guint8 * data, guint len,
|
||||||
if (!cc_valid)
|
if (!cc_valid)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (field1_608)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
field1_608 = TRUE;
|
|
||||||
|
|
||||||
if (data[i * 3 + 1] == 0x80 && data[i * 3 + 2] == 0x80)
|
if (data[i * 3 + 1] == 0x80 && data[i * 3 + 2] == 0x80)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue