| Index: media/filters/ffmpeg_demuxer.cc
|
| diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
|
| index de33dedcbf72c07dba7e82cb070c8539166a051c..d0896ca0d850930a31a1b1d86b411476f7e346e4 100644
|
| --- a/media/filters/ffmpeg_demuxer.cc
|
| +++ b/media/filters/ffmpeg_demuxer.cc
|
| @@ -42,8 +42,8 @@ class AVPacketBuffer : public Buffer {
|
| return reinterpret_cast<const uint8*>(packet_->data);
|
| }
|
|
|
| - virtual size_t GetDataSize() const {
|
| - return static_cast<size_t>(packet_->size);
|
| + virtual int GetDataSize() const {
|
| + return packet_->size;
|
| }
|
|
|
| private:
|
| @@ -391,13 +391,13 @@ size_t FFmpegDemuxer::Read(size_t size, uint8* data) {
|
| return 0;
|
|
|
| // Asynchronous read from data source.
|
| - data_source_->Read(read_position_, size, data,
|
| - base::Bind(&FFmpegDemuxer::OnReadCompleted, this));
|
| + data_source_->Read(read_position_, size, data, base::Bind(
|
| + &FFmpegDemuxer::SignalReadCompleted, this));
|
|
|
| // TODO(hclam): The method is called on the demuxer thread and this method
|
| // call will block the thread. We need to implemented an additional thread to
|
| // let FFmpeg demuxer methods to run on.
|
| - size_t last_read_bytes = WaitForRead();
|
| + int last_read_bytes = WaitForRead();
|
| if (last_read_bytes == DataSource::kReadError) {
|
| if (host())
|
| host()->OnDemuxerError(PIPELINE_ERROR_READ);
|
| @@ -735,16 +735,12 @@ void FFmpegDemuxer::StreamHasEnded() {
|
| }
|
| }
|
|
|
| -void FFmpegDemuxer::OnReadCompleted(size_t size) {
|
| - SignalReadCompleted(size);
|
| -}
|
| -
|
| -size_t FFmpegDemuxer::WaitForRead() {
|
| +int FFmpegDemuxer::WaitForRead() {
|
| read_event_.Wait();
|
| return last_read_bytes_;
|
| }
|
|
|
| -void FFmpegDemuxer::SignalReadCompleted(size_t size) {
|
| +void FFmpegDemuxer::SignalReadCompleted(int size) {
|
| last_read_bytes_ = size;
|
| read_event_.Signal();
|
| }
|
|
|