Skip to content

Commit

Permalink
Merge pull request xbmc#4337 from voguemaster/only_allow_extend_durat…
Browse files Browse the repository at this point in the history
…ion_real_streams

Do not allow non-content stream types to extend the format context's dur...
  • Loading branch information
t-nelson committed Mar 22, 2014
2 parents 1792c17 + e0024d2 commit 6394381
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,8 @@ DemuxPacket* CDVDDemuxFFmpeg::Read()


// check if stream has passed full duration, needed for live streams
if(m_pkt.pkt.dts != (int64_t)AV_NOPTS_VALUE)
bool bAllowDurationExt = (stream->codec && (stream->codec->codec_type == AVMEDIA_TYPE_VIDEO || stream->codec->codec_type == AVMEDIA_TYPE_AUDIO));
if(bAllowDurationExt && m_pkt.pkt.dts != (int64_t)AV_NOPTS_VALUE)
{
int64_t duration;
duration = m_pkt.pkt.dts;
Expand Down

0 comments on commit 6394381

Please sign in to comment.