[FFmpeg-devel] [PATCH] Fix MSVC warnings about possible value truncation.

Peter Kasting pkasting at google.com
Sat Aug 30 00:44:34 CEST 2014

Hi FFMPEG devs, please forgive any errors here as I'm normally a Chromium
developer and this is my first submission to FFMPEG.

The attached patch fixes instances of MSVC warning C4244 about possible
value truncation (e.g. when assigning double to float or int64_t to int).
 This warning is currently disabled in Chromium's MSVC build and I'm trying
to enable it.

The patch touches a couple dozen files, however each file's changes are
basically standalone, so I could split this up into arbitrarily smaller
pieces, all the way down to one patch per file.  I'm happy to break this up
in any way desired if reviewers would prefer.  (One possibility would be
separate patches for each of the four directories touched.)

This is not a rubber-stamp review.  While I intended there to be no
discernable behavior change, it wasn't always clear what the best way to
fix each warning was.  I've marked cases in particular need of review with
"// !!! ..." comments asking what to do, but even in other places, in
particular floating-point casting changes where there may be precision
loss, reviewers should use care.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_warnings.patch
Type: application/octet-stream
Size: 61002 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140829/ede5951f/attachment.obj>

More information about the ffmpeg-devel mailing list