diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2014-09-06 15:14:42 +0400 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2014-09-06 15:14:42 +0400 |
commit | 97bee65ca5d0c3ff758bfd251a74dfb536f60b7d (patch) | |
tree | c702cbf89740a0615805649a08fccdf23a267d7a /demuxer/Demuxers/LAVFDemuxer.cpp | |
parent | 9882f9754cf7fcde20f90809de71ec48e5bc9a33 (diff) |
Flag H.264 in MP4 without a CTTS atom as DTS-only timestamps
Diffstat (limited to 'demuxer/Demuxers/LAVFDemuxer.cpp')
-rw-r--r-- | demuxer/Demuxers/LAVFDemuxer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/demuxer/Demuxers/LAVFDemuxer.cpp b/demuxer/Demuxers/LAVFDemuxer.cpp index 5865d7a0..56c2ca03 100644 --- a/demuxer/Demuxers/LAVFDemuxer.cpp +++ b/demuxer/Demuxers/LAVFDemuxer.cpp @@ -2079,6 +2079,8 @@ const CBaseDemuxer::stream *CLAVFDemuxer::SelectSubtitleStream(std::list<CSubtit return best; } +#include "libavformat/isom.h" + STDMETHODIMP_(DWORD) CLAVFDemuxer::GetStreamFlags(DWORD dwStream) { if (!m_avFormat || dwStream >= m_avFormat->nb_streams) @@ -2090,7 +2092,7 @@ STDMETHODIMP_(DWORD) CLAVFDemuxer::GetStreamFlags(DWORD dwStream) if (strcmp(m_pszInputFormat, "rawvideo") == 0) dwFlags |= LAV_STREAM_FLAG_ONLY_DTS; - if (st->codec->codec_id == AV_CODEC_ID_H264 && (m_bAVI || m_bPMP || (m_bMatroska && (!st->codec->extradata_size || st->codec->extradata[0] != 1)))) + if (st->codec->codec_id == AV_CODEC_ID_H264 && (m_bAVI || m_bPMP || (m_bMatroska && (!st->codec->extradata_size || st->codec->extradata[0] != 1)) || (m_bMP4 && st->priv_data && ((MOVStreamContext *)st->priv_data)->ctts_count == 0))) dwFlags |= LAV_STREAM_FLAG_ONLY_DTS; if (st->codec->codec_id == AV_CODEC_ID_HEVC && m_bAVI) |