Skip to content

Commit

Permalink
[VideoPlayer][Subtitles] Remove codec restrictions for closed captions
Browse files Browse the repository at this point in the history
ffmpeg already sets the sidedata whenever it is detected and as a
result there is no need to restrict this to MPEG or H264. Furthermore
other codecs also support EIA608 (e.g. HEVC)
  • Loading branch information
enen92 committed Jan 10, 2023
1 parent d8b64ef commit 9bcecf9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xbmc/cores/VideoPlayer/VideoPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3756,7 +3756,7 @@ bool CVideoPlayer::OpenVideoStream(CDVDStreamInfo& hint, bool reset)
if(m_CurrentVideo.id < 0 ||
m_CurrentVideo.hint != hint)
{
if (hint.codec == AV_CODEC_ID_MPEG2VIDEO || hint.codec == AV_CODEC_ID_H264)
if (m_pCCDemuxer)
m_pCCDemuxer.reset();

if (!player->OpenStream(hint))
Expand Down Expand Up @@ -3786,8 +3786,8 @@ bool CVideoPlayer::OpenVideoStream(CDVDStreamInfo& hint, bool reset)
static_cast<IDVDStreamPlayerVideo*>(player)->SendMessage(
std::make_shared<CDVDMsg>(CDVDMsg::PLAYER_REQUEST_STATE), 1);

// open CC demuxer if video is mpeg2
if ((hint.codec == AV_CODEC_ID_MPEG2VIDEO || hint.codec == AV_CODEC_ID_H264) && !m_pCCDemuxer)
// open CC demuxer (video may have ATSC a53 side data)
if (!m_pCCDemuxer)
{
m_pCCDemuxer = std::make_unique<CDVDDemuxCC>(hint.codec);
m_SelectionStreams.Clear(STREAM_NONE, STREAM_SOURCE_VIDEOMUX);
Expand Down

0 comments on commit 9bcecf9

Please sign in to comment.