Skip to content

Commit

Permalink
Add search function for DVB extension descriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
kmdewaal committed May 3, 2020
1 parent afaa95a commit af21356
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions mythtv/libs/libmythtv/mpeg/mpegdescriptors.cpp
Expand Up @@ -86,6 +86,19 @@ const unsigned char *MPEGDescriptor::Find(const desc_list_t &parsed,
return nullptr;
}

const unsigned char *MPEGDescriptor::FindExtension(const desc_list_t &parsed,
uint desc_tag)
{
for (const auto *item : parsed)
{
if (item[0] == DescriptorID::extension &&
item[1] > 1 &&
item[2] == desc_tag)
return item;
}
return nullptr;
}

desc_list_t MPEGDescriptor::FindAll(const desc_list_t &parsed, uint desc_tag)
{
desc_list_t tmp;
Expand Down
1 change: 1 addition & 0 deletions mythtv/libs/libmythtv/mpeg/mpegdescriptors.h
Expand Up @@ -329,6 +329,7 @@ class MTV_PUBLIC MPEGDescriptor
int excluded_descid);

static const unsigned char *Find(const desc_list_t &parsed, uint desc_tag);
static const unsigned char *FindExtension(const desc_list_t &parsed, uint desc_tag);
static desc_list_t FindAll(const desc_list_t &parsed, uint desc_tag);

static const unsigned char *FindBestMatch(
Expand Down

0 comments on commit af21356

Please sign in to comment.