Skip to content

Commit

Permalink
[SubtitleSampleReader] Replaced codec string with defines
Browse files Browse the repository at this point in the history
  • Loading branch information
CastagnaIT committed Jul 25, 2023
1 parent 8eb38cb commit fa72613
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/samplereader/SubtitleSampleReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "../utils/CurlUtils.h"
#include "../utils/StringUtils.h"
#include "../utils/Utils.h"
#include "../utils/log.h"

using namespace UTILS;
Expand All @@ -20,9 +21,9 @@ CSubtitleSampleReader::CSubtitleSampleReader(const std::string& url,
: m_streamId{streamId}
{
// Single subtitle file
if (STRING::Contains(codecInternalName, "wvtt"))
if (STRING::Contains(codecInternalName, CODEC::FOURCC_WVTT))
m_codecHandler = std::make_unique<WebVTTCodecHandler>(nullptr, true);
else if (STRING::Contains(codecInternalName, "ttml"))
else if (STRING::Contains(codecInternalName, CODEC::FOURCC_TTML))
m_codecHandler = std::make_unique<TTMLCodecHandler>(nullptr);
else
{
Expand Down

0 comments on commit fa72613

Please sign in to comment.