From f4906f9a851c7056fe04d143f4aea2300cd9ba24 Mon Sep 17 00:00:00 2001 From: trav90 Date: Thu, 26 Apr 2018 16:51:50 -0500 Subject: [FFmpeg] Work around a bug with corrupted data According to FFmpeg documentation, the out parameter is "set to size of parsed buffer or zero if not yet finished." however this is only the case if no error occurred; otherwise it is left untouched. We want the invalid content to generate a decoding error, so we set size to inputSize to ensure decoding failed later. --- dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dom') diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp index 5c1b6c97b..aec1e9136 100644 --- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp +++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp @@ -181,8 +181,8 @@ FFmpegVideoDecoder::DoDecode(MediaRawData* aSample, bool* aGotFrame) #endif )) { while (inputSize) { - uint8_t* data; - int size; + uint8_t* data = inputData; + int size = inputSize; int len = mLib->av_parser_parse2(mCodecParser, mCodecContext, &data, &size, inputData, inputSize, aSample->mTime, aSample->mTimecode, -- cgit v1.2.3 From eee41a3d0ada5b1f3a2a2a86173593832fd615af Mon Sep 17 00:00:00 2001 From: trav90 Date: Thu, 26 Apr 2018 16:56:57 -0500 Subject: Bump VP9 benchmark version ID --- dom/media/Benchmark.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dom') diff --git a/dom/media/Benchmark.cpp b/dom/media/Benchmark.cpp index 1ba6e561c..fdbedeca5 100644 --- a/dom/media/Benchmark.cpp +++ b/dom/media/Benchmark.cpp @@ -22,7 +22,7 @@ namespace mozilla { // Update this version number to force re-running the benchmark. Such as when // an improvement to FFVP9 or LIBVPX is deemed worthwhile. -const uint32_t VP9Benchmark::sBenchmarkVersionID = 2; +const uint32_t VP9Benchmark::sBenchmarkVersionID = 3; const char* VP9Benchmark::sBenchmarkFpsPref = "media.benchmark.vp9.fps"; const char* VP9Benchmark::sBenchmarkFpsVersionCheck = "media.benchmark.vp9.versioncheck"; -- cgit v1.2.3