Permalink
Browse files

Add check that stream->codec is not null.

If it could be null in the previous test, it could be null in this test.

Fixes Coverity CID 1020979
  • Loading branch information...
1 parent e1f096f commit 12c636eb63432fd4e336e771de6dca729a41e465 @cg110 cg110 committed Mar 15, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
@@ -687,7 +687,7 @@ DemuxPacket* CDVDDemuxFFmpeg::Read()
}
// we need to get duration slightly different for matroska embedded text subtitels
- if(m_bMatroska && stream->codec->codec_id == AV_CODEC_ID_TEXT && m_pkt.pkt.convergence_duration != 0)
+ if(m_bMatroska && stream->codec && stream->codec->codec_id == AV_CODEC_ID_TEXT && m_pkt.pkt.convergence_duration != 0)
m_pkt.pkt.duration = m_pkt.pkt.convergence_duration;
if(m_bAVI && stream->codec && stream->codec->codec_type == AVMEDIA_TYPE_VIDEO)

0 comments on commit 12c636e

Please sign in to comment.