Skip to content

Commit

Permalink
Support for descriptor_tag 0x82 in BAT
Browse files Browse the repository at this point in the history
  • Loading branch information
miberian authored and AbuBaniaz committed Sep 19, 2023
1 parent d6f3b94 commit 11cb1ec
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions AutoBouquetsMaker/lib/dvbreader.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,28 @@ PyObject *ss_parse_bat(unsigned char *data, int length) {
descriptor_length -= 4;
}
}
else if (descriptor_tag == 0x82) // LCN descriptor (Movistar+ SD, 19.2E)
{
while (descriptor_length > 0)
{
int service_id = (data[offset3] << 8) | data[offset3 + 1];
int logical_channel_number = (data[offset3 + 2] << 8) | data[offset3 + 3];

PyObject *item = Py_BuildValue("{s:i,s:i,s:i,s:i,s:i,s:i}",
"bouquet_id", bouquet_id,
"transport_stream_id", transport_stream_id,
"original_network_id", original_network_id,
"service_id", service_id,
"logical_channel_number", logical_channel_number,
"descriptor_tag", descriptor_tag);

PyList_Append(list, item);
Py_DECREF(item);

offset3 += 4;
descriptor_length -= 4;
}
}
else if (descriptor_tag == 0x83) // LCN descriptor (NC+, 13E)
{
while (descriptor_length > 0)
Expand Down

0 comments on commit 11cb1ec

Please sign in to comment.