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

Unified Diff: media/mp4/aac.cc

Issue 10886022: Fix encrypted AAC in BMFF by adding subsample info. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use constant in ConvertEsdsToADTS Created 8 years, 4 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
« no previous file with comments | « media/mp4/aac.h ('k') | media/mp4/mp4_stream_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mp4/aac.cc
diff --git a/media/mp4/aac.cc b/media/mp4/aac.cc
index 2804d6b87eb6b91997e19aa78868edd51bcce11c..2982687aa7f54ced154ec4836873b3027db63cba 100644
--- a/media/mp4/aac.cc
+++ b/media/mp4/aac.cc
@@ -156,7 +156,7 @@ ChannelLayout AAC::channel_layout() const {
}
bool AAC::ConvertEsdsToADTS(std::vector<uint8>* buffer) const {
- size_t size = buffer->size() + 7;
+ size_t size = buffer->size() + kADTSHeaderSize;
DCHECK(profile_ >= 1 && profile_ <= 4 && frequency_index_ != 0xf &&
channel_config_ <= 7);
@@ -167,7 +167,7 @@ bool AAC::ConvertEsdsToADTS(std::vector<uint8>* buffer) const {
std::vector<uint8>& adts = *buffer;
- adts.insert(buffer->begin(), 7, 0);
+ adts.insert(buffer->begin(), kADTSHeaderSize, 0);
adts[0] = 0xff;
adts[1] = 0xf1;
adts[2] = ((profile_ - 1) << 6) + (frequency_index_ << 2) +
« no previous file with comments | « media/mp4/aac.h ('k') | media/mp4/mp4_stream_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698