]> git.sesse.net Git - ffmpeg/commitdiff
avformat/flacenc: Use av_clip_uintp2()
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Feb 2015 13:43:28 +0000 (14:43 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Feb 2015 13:43:28 +0000 (14:43 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/flacenc.c

index 0eea94288f650cb52739e1dec832de9ee8a34190..4255363f95d53b971ccafb9eaec69b5996184e7f 100644 (file)
@@ -95,7 +95,7 @@ static int flac_write_header(struct AVFormatContext *s)
         padding = 8192;
     /* The FLAC specification states that 24 bits are used to represent the
      * size of a metadata block so we must clip this value to 2^24-1. */
-    padding = av_clip(padding, 0, 16777215);
+    padding = av_clip_uintp2(padding, 24);
 
     ret = ff_flac_write_header(s->pb, codec->extradata,
                                codec->extradata_size, 0);