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

Unified Diff: media/base/filter_host_impl.h

Issue 39170: Pipeline_Impl was modified to properly render a stream that has video but no ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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/base/filter_host_impl.h
===================================================================
--- media/base/filter_host_impl.h (revision 10997)
+++ media/base/filter_host_impl.h (working copy)
@@ -47,14 +47,12 @@
~FilterHostImpl() {}
// If this FilterHost contains a filter of the specifed Filter class, then
- // this method returns a pointer to the interface, otherwise it returns NULL.
+ // this method returns a pointer to the interface, otherwise it returns NULL
+ // in |*filter_out|.
template <class Filter>
- Filter* GetFilter() const {
- Filter* filter = NULL;
- if (Filter::filter_type() == filter_type_) {
- filter = reinterpret_cast<Filter*>(media_filter());
- }
- return filter;
+ void GetFilter(scoped_refptr<Filter>* filter_out) const {
+ *filter_out = (Filter::filter_type() == filter_type_) ?
+ reinterpret_cast<Filter*>(media_filter()) : NULL;
}
// Call the filter if it has registered a time update callback if the filter

Powered by Google App Engine
This is Rietveld 408576698