Fix packager_main crash in Debug mode muxing clear video

Change-Id: I8bef6a2ebbfc47c7f60fbd2f549ba20cb1daf99c
This commit is contained in:
KongQun Yang 2014-05-01 12:35:24 -07:00
parent 30cb6948e5
commit e8e83cc37c
1 changed files with 11 additions and 11 deletions

View File

@ -211,18 +211,18 @@ bool RunPackager(const std::string& input) {
encryption_key_source = CreateEncryptionKeySource(); encryption_key_source = CreateEncryptionKeySource();
if (!encryption_key_source) if (!encryption_key_source)
return false; return false;
EncryptionKeySource::TrackType track_type =
EncryptionKeySource::GetTrackTypeFromString(FLAGS_track_type);
if (track_type != EncryptionKeySource::TRACK_TYPE_SD &&
track_type != EncryptionKeySource::TRACK_TYPE_HD) {
LOG(ERROR) << "FLAGS_track_type should be either 'SD' or 'HD'";
return false;
}
muxer->SetEncryptionKeySource(encryption_key_source.get(),
track_type,
FLAGS_clear_lead,
FLAGS_crypto_period_duration);
} }
EncryptionKeySource::TrackType track_type =
EncryptionKeySource::GetTrackTypeFromString(FLAGS_track_type);
if (track_type != EncryptionKeySource::TRACK_TYPE_SD &&
track_type != EncryptionKeySource::TRACK_TYPE_HD) {
LOG(ERROR) << "FLAGS_track_type should be either 'SD' or 'HD'";
return false;
}
muxer->SetEncryptionKeySource(encryption_key_source.get(),
track_type,
FLAGS_clear_lead,
FLAGS_crypto_period_duration);
// Start remuxing process. // Start remuxing process.
status = demuxer.Run(); status = demuxer.Run();