Permalink
Browse files

Fix crash.

When playback request failed for whatever reason, if we were to check for the playback status it would crash due to ic being NULL.
  • Loading branch information...
jyavenard committed Apr 24, 2013
1 parent 1512aca commit cc1ca2ef2c12cd25cbced5b57b527382d2d70926
Showing with 2 additions and 2 deletions.
  1. +2 −2 mythtv/libs/libmythtv/avformatdecoder.cpp
@@ -488,7 +488,7 @@ int64_t AvFormatDecoder::NormalizeVideoTimecode(AVStream *st,
int AvFormatDecoder::GetNumChapters()
{
if (ic->nb_chapters > 1)
if (ic && ic->nb_chapters > 1)
return ic->nb_chapters;
return 0;
}
@@ -3798,7 +3798,7 @@ int AvFormatDecoder::SetTrack(uint type, int trackNo)
QString AvFormatDecoder::GetTrackDesc(uint type, uint trackNo) const
{
if (trackNo >= tracks[type].size())
if (!ic || trackNo >= tracks[type].size())
return "";
bool forced = tracks[type][trackNo].forced;

0 comments on commit cc1ca2e

Please sign in to comment.