| Index: media/formats/mp2t/es_parser_h264.cc
|
| diff --git a/media/formats/mp2t/es_parser_h264.cc b/media/formats/mp2t/es_parser_h264.cc
|
| index 8c5911230f053b4526dd6afc4f3df2b938d5d9ee..c26c569fd63700b3c2c28ceb0ff06fae544cd8cd 100644
|
| --- a/media/formats/mp2t/es_parser_h264.cc
|
| +++ b/media/formats/mp2t/es_parser_h264.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "base/logging.h"
|
| #include "base/numerics/safe_conversions.h"
|
| +#include "media/base/encryption_scheme.h"
|
| #include "media/base/stream_parser_buffer.h"
|
| #include "media/base/timestamp_constants.h"
|
| #include "media/base/video_frame.h"
|
| @@ -229,7 +230,8 @@ bool EsParserH264::EmitFrame(int64 access_unit_pos, int access_unit_size,
|
| const H264SPS* sps = h264_parser_->GetSPS(pps->seq_parameter_set_id);
|
| if (!sps)
|
| return false;
|
| - RCHECK(UpdateVideoDecoderConfig(sps));
|
| + EncryptionScheme scheme(false);
|
| + RCHECK(UpdateVideoDecoderConfig(sps, scheme));
|
| }
|
|
|
| // Emit a frame.
|
| @@ -254,7 +256,8 @@ bool EsParserH264::EmitFrame(int64 access_unit_pos, int access_unit_size,
|
| return es_adapter_.OnNewBuffer(stream_parser_buffer);
|
| }
|
|
|
| -bool EsParserH264::UpdateVideoDecoderConfig(const H264SPS* sps) {
|
| +bool EsParserH264::UpdateVideoDecoderConfig(const H264SPS* sps,
|
| + const EncryptionScheme& scheme) {
|
| // Set the SAR to 1 when not specified in the H264 stream.
|
| int sar_width = (sps->sar_width == 0) ? 1 : sps->sar_width;
|
| int sar_height = (sps->sar_height == 0) ? 1 : sps->sar_height;
|
| @@ -281,7 +284,7 @@ bool EsParserH264::UpdateVideoDecoderConfig(const H264SPS* sps) {
|
| VideoDecoderConfig video_decoder_config(
|
| kCodecH264, VIDEO_CODEC_PROFILE_UNKNOWN, PIXEL_FORMAT_YV12,
|
| COLOR_SPACE_HD_REC709, coded_size, visible_rect, natural_size,
|
| - std::vector<uint8_t>(), false);
|
| + std::vector<uint8_t>(), scheme);
|
|
|
| if (!video_decoder_config.Matches(last_video_decoder_config_)) {
|
| DVLOG(1) << "Profile IDC: " << sps->profile_idc;
|
|
|