[FFmpeg-cvslog] avformat/flacenc: Use av_clip_uintp2()

Michael Niedermayer git at videolan.org
Sat Feb 21 14:59:09 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Feb 21 14:43:28 2015 +0100| [2af5fb2f8c1135d1e979164ac87b0252b05cd5b2] | committer: Michael Niedermayer

avformat/flacenc: Use av_clip_uintp2()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2af5fb2f8c1135d1e979164ac87b0252b05cd5b2
---

 libavformat/flacenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/flacenc.c b/libavformat/flacenc.c
index 0eea942..4255363 100644
--- a/libavformat/flacenc.c
+++ b/libavformat/flacenc.c
@@ -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);



More information about the ffmpeg-cvslog mailing list