Skip to content

Commit

Permalink
AudioOutputBase: Fix Coverity 700348. Division by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartm committed Jun 10, 2013
1 parent 64bac71 commit 173466f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mythtv/libs/libmyth/audio/audiooutputbase.cpp
Expand Up @@ -1761,6 +1761,10 @@ int AudioOutputBase::GetAudioData(uchar *buffer, int size, bool full_buffer,
int bdiff = kAudioRingBufferSize - raud;

int obytes = output_settings->SampleSize(output_format);

if (obytes <= 0)
return 0;

bool fromFloats = processing && !enc && output_format != FORMAT_FLT;

// Scale if necessary
Expand Down

0 comments on commit 173466f

Please sign in to comment.