Index: media/filters/h264_parser.cc |
diff --git a/media/filters/h264_parser.cc b/media/filters/h264_parser.cc |
index 22d420bcc6902387f152dda6f2dc53ce5d16df65..fe2a443e32845c77575fb101baa25a6101d56567 100644 |
--- a/media/filters/h264_parser.cc |
+++ b/media/filters/h264_parser.cc |
@@ -213,6 +213,7 @@ bool H264Parser::LocateNALU(off_t* nalu_size, off_t* start_code_size) { |
off_t annexb_start_code_size = 0; |
if (!FindStartCodeInClearRanges(stream_, bytes_left_, |
+ encrypted_ranges_, |
&nalu_start_off, &annexb_start_code_size)) { |
DVLOG(4) << "Could not find start code, end of stream?"; |
return false; |
@@ -238,6 +239,7 @@ bool H264Parser::LocateNALU(off_t* nalu_size, off_t* start_code_size) { |
off_t next_start_code_size = 0; |
off_t nalu_size_without_start_code = 0; |
if (!FindStartCodeInClearRanges(nalu_data, max_nalu_data_size, |
+ encrypted_ranges_, |
&nalu_size_without_start_code, |
&next_start_code_size)) { |
nalu_size_without_start_code = max_nalu_data_size; |
@@ -250,9 +252,10 @@ bool H264Parser::LocateNALU(off_t* nalu_size, off_t* start_code_size) { |
bool H264Parser::FindStartCodeInClearRanges( |
const uint8* data, |
off_t data_size, |
+ const Ranges<const uint8*>& encrypted_ranges, |
off_t* offset, |
off_t* start_code_size) { |
- if (encrypted_ranges_.size() == 0) |
+ if (encrypted_ranges.size() == 0) |
return FindStartCode(data, data_size, offset, start_code_size); |
DCHECK_GE(data_size, 0); |
@@ -270,7 +273,7 @@ bool H264Parser::FindStartCodeInClearRanges( |
Ranges<const uint8*> start_code_range; |
start_code_range.Add(start_code, start_code_end + 1); |
- if (encrypted_ranges_.IntersectionWith(start_code_range).size() > 0) { |
+ if (encrypted_ranges.IntersectionWith(start_code_range).size() > 0) { |
// The start code is inside an encrypted section so we need to scan |
// for another start code. |
*start_code_size = 0; |