Commit b2271028 authored by geofflang's avatar geofflang Committed by Commit bot

Revert of Fix MultibufferDataSource::GetSize (patchset #1 id:1 of...

Revert of Fix MultibufferDataSource::GetSize (patchset #1 id:1 of https://codereview.chromium.org/2110853006/ )

Reason for revert:
I believe this CL is causing flakyness in the video related tests on the GPU FYI waterfall.

Examples:
https://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Release%20%28NVIDIA%29/builds/25925
https://build.chromium.org/p/chromium.gpu.fyi/builders/Linux%20Release%20%28ATI%29/builds/48492
https://build.chromium.org/p/chromium.gpu.fyi/builders/Mac%20Retina%20Release/builds/5019

Seeing this in the output log:
[27562:1287:0630/083352:WARNING:webmediaplayer_impl.cc(335)] Using MultibufferDataSource
[27562:34423:0630/083352:ERROR:ffmpeg_demuxer.cc(1510)] OnReadFrameDone result=-541478725 IsMaxMemoryUsageReached=0
[27562:1287:0630/083352:WARNING:webmediaplayer_impl.cc(335)] Using MultibufferDataSource
[27562:1287:0630/083352:FATAL:resource_multibuffer_data_provider.cc(75)] Check failed: byte_pos() < url_data_->length() (32768 vs. 10292) http://127.0.0.1:53903/resources/red-green.theora.ogv

Original issue's description:
> Fix MultibufferDataSource::GetSize
>
> When file loading is finished ResourceMultiBufferDataProvider count
> DataBuffer queue size twice, so GetSize returned incorrect value.
>
> BUG=
>
> Committed: https://crrev.com/bbaba3c8053a39f6d11d78a6e4770b37a9639067
> Cr-Commit-Position: refs/heads/master@{#403123}

TBR=hubbe@chromium.org,kostya-k@yandex-team.ru
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=624853

Review-Url: https://codereview.chromium.org/2115483003
Cr-Commit-Position: refs/heads/master@{#403211}
parent 85fa838e
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "base/macros.h" #include "base/macros.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "media/base/media_log.h" #include "media/base/media_log.h"
#include "media/base/mock_filters.h" #include "media/base/mock_filters.h"
#include "media/base/test_helpers.h" #include "media/base/test_helpers.h"
...@@ -1426,26 +1425,4 @@ TEST_F(MultibufferDataSourceTest, LengthKnownAtEOF) { ...@@ -1426,26 +1425,4 @@ TEST_F(MultibufferDataSourceTest, LengthKnownAtEOF) {
Stop(); Stop();
} }
TEST_F(MultibufferDataSourceTest, FileSizeLessThanBlockSize) {
Initialize(kHttpUrl, true);
GURL gurl(kHttpUrl);
blink::WebURLResponse response(gurl);
response.setHTTPStatusCode(200);
response.setHTTPHeaderField(
WebString::fromUTF8("Content-Length"),
WebString::fromUTF8(base::Int64ToString(kDataSize / 2)));
response.setExpectedContentLength(kDataSize / 2);
Respond(response);
EXPECT_CALL(host_, AddBufferedByteRange(0, kDataSize / 2));
EXPECT_CALL(host_, SetTotalBytes(kDataSize / 2));
EXPECT_CALL(host_, AddBufferedByteRange(0, kDataSize * 2));
ReceiveData(kDataSize / 2);
FinishLoading();
int64_t len = 0;
EXPECT_TRUE(data_source_->GetSize(&len));
EXPECT_EQ(kDataSize / 2, len);
Stop();
}
} // namespace media } // namespace media
...@@ -402,6 +402,8 @@ void ResourceMultiBufferDataProvider::didFinishLoading( ...@@ -402,6 +402,8 @@ void ResourceMultiBufferDataProvider::didFinishLoading(
// If we didn't know the |instance_size_| we do now. // If we didn't know the |instance_size_| we do now.
int64_t size = byte_pos(); int64_t size = byte_pos();
if (!fifo_.empty())
size += fifo_.back()->data_size();
// This request reports something smaller than what we've seen in the past, // This request reports something smaller than what we've seen in the past,
// Maybe it's transient error? // Maybe it's transient error?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment