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

Unified Diff: media/formats/mp2t/es_parser_adts.cc

Issue 2783703002: Declare intent to use sample-aes later in the stream. (Closed)
Patch Set: tweak needed for flush Created 3 years, 3 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/formats/mp2t/descriptors.cc ('k') | media/formats/mp2t/es_parser_h264.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp2t/es_parser_adts.cc
diff --git a/media/formats/mp2t/es_parser_adts.cc b/media/formats/mp2t/es_parser_adts.cc
index 2ba520cf481d48e95593c67b5bb9bf88c1a0221e..7d251c384d42753ca17865a1e2c31fa28fca892c 100644
--- a/media/formats/mp2t/es_parser_adts.cc
+++ b/media/formats/mp2t/es_parser_adts.cc
@@ -210,13 +210,14 @@ bool EsParserAdts::ParseFromEsQueue() {
#if BUILDFLAG(ENABLE_HLS_SAMPLE_AES)
if (use_hls_sample_aes_) {
const DecryptConfig* base_decrypt_config = get_decrypt_config_cb_.Run();
- RCHECK(base_decrypt_config);
- std::vector<SubsampleEntry> subsamples;
- CalculateSubsamplesForAdtsFrame(adts_frame, &subsamples);
- std::unique_ptr<DecryptConfig> decrypt_config(
- new DecryptConfig(base_decrypt_config->key_id(),
- base_decrypt_config->iv(), subsamples));
- stream_parser_buffer->set_decrypt_config(std::move(decrypt_config));
+ if (base_decrypt_config) {
+ std::vector<SubsampleEntry> subsamples;
+ CalculateSubsamplesForAdtsFrame(adts_frame, &subsamples);
+ std::unique_ptr<DecryptConfig> decrypt_config(
+ new DecryptConfig(base_decrypt_config->key_id(),
+ base_decrypt_config->iv(), subsamples));
+ stream_parser_buffer->set_decrypt_config(std::move(decrypt_config));
+ }
}
#endif
emit_buffer_cb_.Run(stream_parser_buffer);
« no previous file with comments | « media/formats/mp2t/descriptors.cc ('k') | media/formats/mp2t/es_parser_h264.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698