summaryrefslogtreecommitdiffstats
path: root/media/webm
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-12 23:57:13 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-12 23:57:13 +0000
commited44f3cafb0d402a0772159b95d87acb090ac920 (patch)
treeb60ccdf21dd818f024be2ccf6f377b0c47fad23c /media/webm
parent7f6c0ed1f4e27706774e0fbd4150ffb2b80df993 (diff)
downloadchromium_src-ed44f3cafb0d402a0772159b95d87acb090ac920.zip
chromium_src-ed44f3cafb0d402a0772159b95d87acb090ac920.tar.gz
chromium_src-ed44f3cafb0d402a0772159b95d87acb090ac920.tar.bz2
Make VideoDecoderConfig copyable.
I guess the reasons we didn't make VideoDecoderConfig copyable is: 1) VideoDecoderConfig contains extra data, which needs deep copy. 2) We don't have a lot of use cases that needs to copy VideoDecoderConfig. If we do, we can use CopyFrom(). For (1), the extra data is typically small (< 100 bytes). Copying extra data should not have any performance impact. For (2), we do have legitimate cases where we need to copy VideoDecoderConfig implicitly: - Put VideoDecoderConfig in STL container, e.g. in SourceBufferStream. - Bind VideoDecoderCongfig in a callback, e.g. in DecryptingVideoDecoder. This CL uses std::vector<uint8> for the extra data and solves the deep copy issue. Then it makes VideoDecoderConfig copyable and makes several use cases of VideoDecoderConfig simpler. BUG=177543 TEST=All tests pass. Review URL: https://chromiumcodereview.appspot.com/12637017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187702 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/webm')
-rw-r--r--media/webm/webm_stream_parser.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/webm/webm_stream_parser.cc b/media/webm/webm_stream_parser.cc
index db854a9..ca7ec30 100644
--- a/media/webm/webm_stream_parser.cc
+++ b/media/webm/webm_stream_parser.cc
@@ -384,7 +384,7 @@ int WebMStreamParser::ParseInfoAndTracks(const uint8* data, int size) {
FireNeedKey(tracks_parser.video_encryption_key_id());
} else {
- video_config.CopyFrom(config_helper.video_config());
+ video_config = config_helper.video_config();
}
if (!config_cb_.Run(audio_config, video_config)) {