Chromecast: fix accidental dangling reference in CC renderer factory
commit020d2a06d7e7f8cdf626850b174341b332d6495c
authorservolk <servolk@chromium.org>
Thu, 4 Jun 2015 00:29:21 +0000 (3 17:29 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 4 Jun 2015 00:30:55 +0000 (4 00:30 +0000)
tree7974ccc13c78c7451fe71fb690ace08525780ca4
parente0848a67d28585159ebf8a3bb4e36eca70c50d85
Chromecast: fix accidental dangling reference in CC renderer factory

The last parameter of media::DefaultRendererFactory is audio_config,
which is passed by reference and is assumed to be owned by the caller.
Currently we are passing a reference to local object in there, which
creates dangling reference after we leave local scope. We need to
own and keep AudioHardwareConfig object alive as long as
DefaultRendererFactory is alive.

BUG=none

Review URL: https://codereview.chromium.org/1167873002

Cr-Commit-Position: refs/heads/master@{#332750}
chromecast/renderer/media/chromecast_media_renderer_factory.cc
chromecast/renderer/media/chromecast_media_renderer_factory.h