diff options
Diffstat (limited to 'media/tools/player_wtl')
-rw-r--r-- | media/tools/player_wtl/wtl_renderer.cc | 8 | ||||
-rw-r--r-- | media/tools/player_wtl/wtl_renderer.h | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/media/tools/player_wtl/wtl_renderer.cc b/media/tools/player_wtl/wtl_renderer.cc index c5d9fd3..9e1589f 100644 --- a/media/tools/player_wtl/wtl_renderer.cc +++ b/media/tools/player_wtl/wtl_renderer.cc @@ -18,11 +18,9 @@ bool WtlVideoRenderer::OnInitialize(media::VideoDecoder* decoder) { return true; } -void WtlVideoRenderer::OnStop(media::FilterCallback* callback) { - if (callback) { - callback->Run(); - delete callback; - } +void WtlVideoRenderer::OnStop(const base::Closure& callback) { + if (!callback.is_null()) + callback.Run(); } void WtlVideoRenderer::OnFrameAvailable() { diff --git a/media/tools/player_wtl/wtl_renderer.h b/media/tools/player_wtl/wtl_renderer.h index e929d8e..8e504b8 100644 --- a/media/tools/player_wtl/wtl_renderer.h +++ b/media/tools/player_wtl/wtl_renderer.h @@ -17,7 +17,7 @@ class WtlVideoRenderer : public media::VideoRendererBase { protected: // VideoRendererBase implementation. virtual bool OnInitialize(media::VideoDecoder* decoder); - virtual void OnStop(media::FilterCallback* callback); + virtual void OnStop(const base::Closure& callback); virtual void OnFrameAvailable(); private: |