Skip to content

Commit

Permalink
ffmpeg demuxer: allow a stream change if pat/pmt was not seen on open
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta authored and popcornmix committed Aug 3, 2014
1 parent 4c070cd commit b4ce1a8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
Expand Up @@ -466,7 +466,13 @@ bool CDVDDemuxFFmpeg::Open(CDVDInputStream* pInput, bool streaminfo)

UpdateCurrentPTS();

CreateStreams();
// in case of mpegts and we have not seen pat/pmt, defer creation of streams
if (!m_checkvideo || m_pFormatContext->nb_programs > 0)
CreateStreams();

// allow IsProgramChange to return true
if (m_checkvideo && GetNrOfStreams() == 0)
m_program = 0;

return true;
}
Expand Down

0 comments on commit b4ce1a8

Please sign in to comment.