Skip to content

Commit

Permalink
AVFormatDecoderDVD: Fix coverity 700543. Check that the stream id is …
Browse files Browse the repository at this point in the history
…>= 0 before implicitly casting it to uint.
  • Loading branch information
stuartm committed Jun 15, 2013
1 parent 2b8a573 commit 253a73c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mythtv/libs/libmythtv/DVD/avformatdecoderdvd.cpp
Expand Up @@ -244,7 +244,8 @@ void AvFormatDecoderDVD::StreamChangeCheck(void)
int AvFormatDecoderDVD::GetAudioLanguage(uint audio_index, uint stream_index)
{
(void)audio_index;
if (ringBuffer && ringBuffer->IsDVD())
if ((ic->streams[stream_index]->id >= 0) &&
ringBuffer && ringBuffer->IsDVD())
{
return ringBuffer->DVD()->GetAudioLanguage(
ringBuffer->DVD()->GetAudioTrackNum(ic->streams[stream_index]->id));
Expand Down

0 comments on commit 253a73c

Please sign in to comment.