Browse Source

avcodec/utils: Add braces to framecount computation

Suggestes-by: ubitux
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.1
Michael Niedermayer 9 years ago
parent
commit
bcf936eaea
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/utils.c

+ 1
- 1
libavcodec/utils.c View File

@@ -3157,7 +3157,7 @@ static int get_audio_frame_duration(enum AVCodecID id, int sr, int ch, int ba,
uint8_t * extradata, int frame_size, int frame_bytes)
{
int bps = av_get_exact_bits_per_sample(id);
int framecount = ba>0 && frame_bytes / ba>0 ? frame_bytes / ba : 1;
int framecount = (ba > 0 && frame_bytes / ba > 0) ? frame_bytes / ba : 1;

/* codecs with an exact constant bits per sample */
if (bps > 0 && ch > 0 && frame_bytes > 0 && ch < 32768 && bps < 32768)


Loading…
Cancel
Save