summaryrefslogtreecommitdiffstats
path: root/webkit/media
diff options
context:
space:
mode:
authorwjia@chromium.org <wjia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-14 22:58:26 +0000
committerwjia@chromium.org <wjia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-14 22:58:26 +0000
commit868c0e4847217a57abfdbace7bb85d63253d5a39 (patch)
tree1c405067a3829702e64bedbb751f74fd3d117ed8 /webkit/media
parentdc7501093791f6c85c16d32f09be4038b0623562 (diff)
downloadchromium_src-868c0e4847217a57abfdbace7bb85d63253d5a39.zip
chromium_src-868c0e4847217a57abfdbace7bb85d63253d5a39.tar.gz
chromium_src-868c0e4847217a57abfdbace7bb85d63253d5a39.tar.bz2
Do not change video decoder collection unless it is indeed a media stream.
Review URL: https://chromiumcodereview.appspot.com/9702041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126775 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/media')
-rw-r--r--webkit/media/filter_helpers.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/webkit/media/filter_helpers.cc b/webkit/media/filter_helpers.cc
index c6f5b2e..2c1b136 100644
--- a/webkit/media/filter_helpers.cc
+++ b/webkit/media/filter_helpers.cc
@@ -38,6 +38,11 @@ bool BuildMediaStreamCollection(const WebKit::WebURL& url,
if (!client)
return false;
+ scoped_refptr<media::VideoDecoder> video_decoder = client->GetVideoDecoder(
+ url, message_loop_factory);
+ if (!video_decoder)
+ return false;
+
// Remove any "traditional" decoders (e.g. GpuVideoDecoder) from the
// collection.
// NOTE: http://crbug.com/110800 is about replacing this ad-hockery with
@@ -47,11 +52,6 @@ bool BuildMediaStreamCollection(const WebKit::WebURL& url,
filter_collection->SelectVideoDecoder(&old_videodecoder);
} while (old_videodecoder);
- scoped_refptr<media::VideoDecoder> video_decoder = client->GetVideoDecoder(
- url, message_loop_factory);
- if (!video_decoder)
- return false;
-
filter_collection->AddVideoDecoder(video_decoder);
// TODO(vrk/wjia): Setting true for local_source is under the assumption