Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1137)

Unified Diff: media/filters/ffmpeg_demuxer.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/audio_manager_base.cc ('k') | media/filters/video_renderer_base_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_demuxer.cc
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 2bae64e5ffe4a1f148502c9ccf2fac3a8c0a7098..508dd095407f27020fe3558156e48890391d5661 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -336,9 +336,13 @@ void FFmpegDemuxer::Seek(base::TimeDelta time, const PipelineStatusCB& cb) {
// the lowest-index audio stream.
pending_seek_ = true;
base::PostTaskAndReplyWithResult(
- blocking_thread_.message_loop_proxy(), FROM_HERE,
- base::Bind(&av_seek_frame, glue_->format_context(), -1,
- time.InMicroseconds(), flags),
+ blocking_thread_.message_loop_proxy().get(),
+ FROM_HERE,
+ base::Bind(&av_seek_frame,
+ glue_->format_context(),
+ -1,
+ time.InMicroseconds(),
+ flags),
base::Bind(&FFmpegDemuxer::OnSeekFrameDone, weak_this_, cb));
}
@@ -379,7 +383,8 @@ void FFmpegDemuxer::Initialize(DemuxerHost* host,
// Open the AVFormatContext using our glue layer.
CHECK(blocking_thread_.Start());
base::PostTaskAndReplyWithResult(
- blocking_thread_.message_loop_proxy(), FROM_HERE,
+ blocking_thread_.message_loop_proxy().get(),
+ FROM_HERE,
base::Bind(&FFmpegGlue::OpenContext, base::Unretained(glue_.get())),
base::Bind(&FFmpegDemuxer::OnOpenContextDone, weak_this_, status_cb));
}
@@ -456,8 +461,10 @@ void FFmpegDemuxer::OnOpenContextDone(const PipelineStatusCB& status_cb,
// Fully initialize AVFormatContext by parsing the stream a little.
base::PostTaskAndReplyWithResult(
- blocking_thread_.message_loop_proxy(), FROM_HERE,
- base::Bind(&avformat_find_stream_info, glue_->format_context(),
+ blocking_thread_.message_loop_proxy().get(),
+ FROM_HERE,
+ base::Bind(&avformat_find_stream_info,
+ glue_->format_context(),
static_cast<AVDictionary**>(NULL)),
base::Bind(&FFmpegDemuxer::OnFindStreamInfoDone, weak_this_, status_cb));
}
@@ -620,10 +627,11 @@ void FFmpegDemuxer::ReadFrameIfNeeded() {
pending_read_ = true;
base::PostTaskAndReplyWithResult(
- blocking_thread_.message_loop_proxy(), FROM_HERE,
+ blocking_thread_.message_loop_proxy().get(),
+ FROM_HERE,
base::Bind(&av_read_frame, glue_->format_context(), packet_ptr),
- base::Bind(&FFmpegDemuxer::OnReadFrameDone, weak_this_,
- base::Passed(&packet)));
+ base::Bind(
+ &FFmpegDemuxer::OnReadFrameDone, weak_this_, base::Passed(&packet)));
}
void FFmpegDemuxer::OnReadFrameDone(ScopedAVPacket packet, int result) {
« no previous file with comments | « media/audio/audio_manager_base.cc ('k') | media/filters/video_renderer_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698