[FFmpeg-cvslog] wtv: Make WTV_SECTOR_BITS a 64 bit constant

Martin Storsjö git at videolan.org
Sat Jul 27 09:25:14 CEST 2013


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Wed Jul 24 12:21:49 2013 +0300| [86f042dcabde2a5386dbd95ab0451b274987d253] | committer: Martin Storsjö

wtv: Make WTV_SECTOR_BITS a 64 bit constant

This makes sure that values that are left-shifted by this constant
end up casted to 64 bit before shifting, avoiding overflow if the
value ends up larger than 2 GB.

Signed-off-by: Martin Storsjö <martin at martin.st>

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

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

diff --git a/libavformat/wtv.c b/libavformat/wtv.c
index 8b92746..d7f85a7 100644
--- a/libavformat/wtv.c
+++ b/libavformat/wtv.c
@@ -48,7 +48,7 @@
  *
  */
 
-#define WTV_SECTOR_BITS    12
+#define WTV_SECTOR_BITS    INT64_C(12)
 #define WTV_SECTOR_SIZE    (1 << WTV_SECTOR_BITS)
 #define WTV_BIGSECTOR_BITS 18
 



More information about the ffmpeg-cvslog mailing list