mp3enc:use FFMIN()
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 26 Apr 2011 01:31:02 +0000 (03:31 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 7 May 2011 01:58:52 +0000 (03:58 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mp3enc.c

index 7a80159..dfcad87 100644 (file)
@@ -339,7 +339,7 @@ static void mp3_fix_xing(AVFormatContext *s)
     for (i = 1; i < VBR_TOC_SIZE; ++i) {
         int j = i * toc->pos / VBR_TOC_SIZE;
         int seek_point = 256LL * toc->bag[j] / xing_header->size;
-        avio_w8(s->pb, (uint8_t)(seek_point < 256 ? seek_point : 255));
+        avio_w8(s->pb, FFMIN(seek_point, 255));
     }
 
     avio_flush(s->pb);