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

Unified Diff: media/tools/player_wtl/movie.cc

Issue 9015015: Take advantage of the new Pass() machinery on scoped_ptr{,_malloc}. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: acolwell CR#2 responses. Created 8 years, 12 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
Index: media/tools/player_wtl/movie.cc
diff --git a/media/tools/player_wtl/movie.cc b/media/tools/player_wtl/movie.cc
index 043932eef2273d68d1100aa64c371f92f7535568..bb47cbe300a053f4221a9552dd15c769dd97de0a 100644
--- a/media/tools/player_wtl/movie.cc
+++ b/media/tools/player_wtl/movie.cc
@@ -72,8 +72,10 @@ bool Movie::Open(const wchar_t* url, VideoRendererBase* video_renderer) {
// Create filter collection.
scoped_ptr<FilterCollection> collection(new FilterCollection());
- collection->SetDemuxerFactory(new FFmpegDemuxerFactory(
- new FileDataSourceFactory(), pipeline_loop));
+ collection->SetDemuxerFactory(
+ scoped_ptr<DemuxerFactory>(new FFmpegDemuxerFactory(
+ scoped_ptr<DataSourceFactory>(new FileDataSourceFactory()),
+ pipeline_loop)));
collection->AddAudioDecoder(new FFmpegAudioDecoder(
message_loop_factory_->GetMessageLoop("AudioDecoderThread")));
collection->AddVideoDecoder(new FFmpegVideoDecoder(
@@ -89,7 +91,7 @@ bool Movie::Open(const wchar_t* url, VideoRendererBase* video_renderer) {
// Create and start our pipeline.
media::PipelineStatusNotification note;
- pipeline_->Start(collection.release(), WideToUTF8(std::wstring(url)),
+ pipeline_->Start(collection.Pass(), WideToUTF8(std::wstring(url)),
note.Callback());
// Wait until the pipeline is fully initialized.
note.Wait();

Powered by Google App Engine
This is Rietveld 408576698