Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
DVDRingBuffer: Fix coverity 751766. Check the return value of dvdnav_…
…get_audio_logical_stream(), it can return -1 in the event of an error but we weren't handling this correctly.
  • Loading branch information
stuartm committed Jun 15, 2013
1 parent a1b4b60 commit b89b021
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mythtv/libs/libmythtv/DVD/dvdringbuffer.cpp
Expand Up @@ -1597,6 +1597,10 @@ int DVDRingBuffer::GetAudioTrackType(uint stream_id)
int ret = -1;
audio_attr_t attributes;
int logicalStreamId = dvdnav_get_audio_logical_stream(m_dvdnav, stream_id);

if (logicalStreamId < 0)
return -1;

if (dvdnav_get_audio_attr(m_dvdnav, logicalStreamId, &attributes) >= 1)
{
LOG(VB_AUDIO, LOG_INFO, QString("DVD Audio Track #%1 Language "
Expand Down

0 comments on commit b89b021

Please sign in to comment.