shithub: openh264

Download patch

ref: a852ac99edac9a95f1d89009b12cfa6094dd9e53
parent: 93cb6179328c59c2b673c3c7c15d3391e7f4e3d6
author: Martin Storsjö <martin@martin.st>
date: Fri Jan 16 05:26:36 EST 2015

Fix a cast to actually cast to the right type

The existing cast didn't make much sense. The expression itself is
already int, there's little point in casting it to int, especially
when assigning to a float.

This fixes warnings with MSVC.

--- a/test/encoder/EncUT_EncoderExt.cpp
+++ b/test/encoder/EncUT_EncoderExt.cpp
@@ -191,7 +191,7 @@
   pSrcPic->uiTimeStamp += 30;
 
   eOptionId = ENCODER_OPTION_FRAME_RATE;
-  fValue = static_cast<int> (rand() % 60 - 5);
+  fValue = static_cast<float> (rand() % 60 - 5);
   iResult = pPtrEnc->SetOption (eOptionId, &fValue);
 
   if (fValue <= 0)