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

Unified Diff: chromecast/media/cdm/chromecast_init_data.cc

Issue 1168153003: Chromecast PSSH boxes must use data_size parameter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | chromecast/media/cdm/chromecast_init_data_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cdm/chromecast_init_data.cc
diff --git a/chromecast/media/cdm/chromecast_init_data.cc b/chromecast/media/cdm/chromecast_init_data.cc
index ba27d2efd95acc14069b03ca950094e0c87af6cd..d9e76a51b11dd758cc9c287149c6ee8643a342de 100644
--- a/chromecast/media/cdm/chromecast_init_data.cc
+++ b/chromecast/media/cdm/chromecast_init_data.cc
@@ -107,6 +107,11 @@ bool FindChromecastInitData(const std::vector<uint8_t>& init_data,
RCHECK(reader.SkipBits(16 * 8));
box_bytes_read += 16;
+ uint32_t data_size;
+ RCHECK(reader.ReadBits(4 * 8, &data_size));
+ box_bytes_read += 4;
+ RCHECK(data_size == box_size - box_bytes_read);
lcwu1 2015/06/09 18:22:22 Are we adding a new data_size field in the custom
gunsch 2015/06/09 18:54:13 We are not, and even if we were this does not affe
+
uint16_t msg_type;
RCHECK(reader.ReadBits(2 * 8, &msg_type));
box_bytes_read += 2;
« no previous file with comments | « no previous file | chromecast/media/cdm/chromecast_init_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698