From e8e83cc37ccac515b60efc75f42a85de6a0056b1 Mon Sep 17 00:00:00 2001 From: KongQun Yang Date: Thu, 1 May 2014 12:35:24 -0700 Subject: [PATCH] Fix packager_main crash in Debug mode muxing clear video Change-Id: I8bef6a2ebbfc47c7f60fbd2f549ba20cb1daf99c --- app/packager_main.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/packager_main.cc b/app/packager_main.cc index bb7b22fca7..95d5985ed8 100644 --- a/app/packager_main.cc +++ b/app/packager_main.cc @@ -211,18 +211,18 @@ bool RunPackager(const std::string& input) { encryption_key_source = CreateEncryptionKeySource(); if (!encryption_key_source) 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. status = demuxer.Run();