Skip to content

Commit

Permalink
Subtitle PIDs must start at 0x12A0 for HDR (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcdr428 authored Feb 2, 2020
1 parent f504a0c commit 7740bd5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tsMuxer/psgStreamReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "avCodecs.h"
#include "math.h"
#include "tsMuxer.h"
#include "tsPacket.h"
#include "vodCoreException.h"
#include "vod_common.h"
Expand Down Expand Up @@ -761,7 +762,7 @@ CheckStreamRez PGSStreamReader::checkStream(uint8_t* buffer, int len, ContainerT
rez.codecInfo = pgsCodecInfo;
rez.streamDescr = "Presentation Graphic Stream";
if (containerStreamIndex >= 0x1200)
rez.streamDescr += std::string(" #") + int32ToStr(containerStreamIndex - 0x1200);
rez.streamDescr += std::string(" #") + int32ToStr(containerStreamIndex - (V3_flags & 1 ? 0x1200 : 0x12A0));
}
else if (containerType == ctMKV && containerDataType == STREAM_TYPE_SUB_PGS)
{
Expand Down
4 changes: 2 additions & 2 deletions tsMuxer/tsMuxer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,12 @@ void TSMuxer::intAddStream(const std::string& streamName, const std::string& cod
}
else if (codecName == "S_HDMV/PGS")
{
tsStreamIndex = 0x1200 + m_pgsTrackCnt;
tsStreamIndex = (V3_flags & 1 ? 0x1200 : 0x12A0) + m_pgsTrackCnt;
m_pgsTrackCnt++;
}
else if (codecName == "S_TEXT/UTF8")
{
tsStreamIndex = 0x1200 + m_pgsTrackCnt;
tsStreamIndex = (V3_flags & 1 ? 0x1200 : 0x12A0) + m_pgsTrackCnt;
m_pgsTrackCnt++;
}
m_extIndexToTSIndex[streamIndex] = tsStreamIndex;
Expand Down

0 comments on commit 7740bd5

Please sign in to comment.