Bug 1147744 - Part 1: Round down display size. r=k17e, a=sledru
--- a/media/libstagefright/binding/H264.cpp
+++ b/media/libstagefright/binding/H264.cpp
@@ -4,17 +4,16 @@
#include "mozilla/ArrayUtils.h"
#include "mozilla/PodOperations.h"
#include "mp4_demuxer/AnnexB.h"
#include "mp4_demuxer/ByteReader.h"
#include "mp4_demuxer/ByteWriter.h"
#include "mp4_demuxer/H264.h"
#include <media/stagefright/foundation/ABitReader.h>
-#include <cmath>
using namespace mozilla;
namespace mp4_demuxer
{
class BitReader
{
@@ -127,17 +126,17 @@ H264::DecodeNALUnit(const ByteBuffer* aN
return rbsp.forget();
}
static int32_t
ConditionDimension(float aValue)
{
// This will exclude NaNs and too-big values.
if (aValue > 1.0 && aValue <= INT32_MAX)
- return int32_t(round(aValue));
+ return int32_t(aValue);
return 0;
}
/* static */ bool
H264::DecodeSPS(const ByteBuffer* aSPS, SPSData& aDest)
{
MOZ_ASSERT(aSPS);
BitReader br(*aSPS);