Browse Source

nsvdec: fix division by 0

Fixes CID717749
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 12 years ago
parent
commit
d633e15d7d
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavformat/nsvdec.c

+ 4
- 1
libavformat/nsvdec.c View File

@@ -653,7 +653,10 @@ null_chunk_retry:
if (bps != 16) {
av_dlog(s, "NSV AUDIO bit/sample != 16 (%d)!!!\n", bps);
}
bps /= channels; // ???
if(channels)
bps /= channels; // ???
else
av_log(s, AV_LOG_WARNING, "Channels is 0\n");
if (bps == 8)
st[NSV_ST_AUDIO]->codec->codec_id = AV_CODEC_ID_PCM_U8;
samplerate /= 4;/* UGH ??? XXX */


Loading…
Cancel
Save