Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions closedcaptions/subtec/CCDataController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ namespace
}
}

void CCDataController::sendCCSetAttribute(gsw_CcAttributes * attrib, short type, gsw_CcType ccType)
void CCDataController::sendCCSetAttribute(gsw_CcAttributes * attrib, uint32_t type, gsw_CcType ccType)
{
using AttributesArray = std::array<uint32_t, 14> ;

Expand Down Expand Up @@ -312,7 +312,7 @@ void CCDataController::sendCCSetAttribute(gsw_CcAttributes * attrib, short type,

const auto ccTypeValue = getValue(ccType);

channel.SendCCSetAttributePacket(ccTypeValue, uint32_t{type}, attributes);
channel.SendCCSetAttributePacket(ccTypeValue, type, attributes);
}

void closedCaptionDecodeCb(void *context, int decoderIndex, int event)
Expand Down
2 changes: 1 addition & 1 deletion closedcaptions/subtec/CCDataController.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class CCDataController
void sendPause();
void sendResume();
void sendResetChannelPacket();
void sendCCSetAttribute(gsw_CcAttributes * attrib, short type, gsw_CcType ccType);
void sendCCSetAttribute(gsw_CcAttributes * attrib, uint32_t type, gsw_CcType ccType);

void ccSetDigitalChannel(unsigned int channel);
void ccSetAnalogChannel(unsigned int channel);
Expand Down
3 changes: 2 additions & 1 deletion closedcaptions/subtec/SubtecConnector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ namespace ccMgrAPI
{
((gsw_CcColor*)values[i])->rgb = pValues[i];
strncpy(((gsw_CcColor*)values[i])->name, pValuesNames[i],
GSW_MAX_CC_COLOR_NAME_LENGTH);
GSW_MAX_CC_COLOR_NAME_LENGTH - 1);
((gsw_CcColor*)values[i])->name[GSW_MAX_CC_COLOR_NAME_LENGTH - 1] = '\0';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has this been tested?
shouldnt it be ((gsw_CcColor*)values[i])->name[GSW_MAX_CC_COLOR_NAME_LENGTH] = '\0';

}
break;
}
Expand Down
2 changes: 1 addition & 1 deletion drm/helper/DrmHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class DrmHelper
const std::string EMPTY_DRM_METADATA;

const std::string EMPTY_STRING;
DrmHelper(const struct DrmInfo drmInfo) : mDrmInfo(drmInfo), TIMEOUT_SECONDS(5000U), EMPTY_DRM_METADATA(), EMPTY_STRING() ,bOutputProtectionEnabled(false), protectionScheme() {}
DrmHelper(const struct DrmInfo& drmInfo) : mDrmInfo(drmInfo), TIMEOUT_SECONDS(5000U), EMPTY_DRM_METADATA(), EMPTY_STRING() ,bOutputProtectionEnabled(false), protectionScheme() {}
DrmHelper(const DrmHelper&) = delete;
DrmHelper& operator=(const DrmHelper&) = delete;

Expand Down
4 changes: 2 additions & 2 deletions subtec/libsubtec/SubtecPacket.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Packet
Packet() : m_buffer(), m_counter(std::numeric_limits<std::uint32_t>::max()) {}
Packet(std::uint32_t counter) : m_buffer(), m_counter(counter) {}

const uint32_t getType()
uint32_t getType()
{
uint32_t type = 0;

Expand All @@ -54,7 +54,7 @@ class Packet
return m_buffer;
}

const std::uint32_t getCounter()
std::uint32_t getCounter()
{
return m_counter;
}
Expand Down
Loading