diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-11-20 21:05:11 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-11-20 21:05:11 +0100 |
| commit | bb8cf4610af37d4f89555f96990ef1b9c7d58acd (patch) | |
| tree | d231bdf337c4bc36e615eee6e71c16ee83db3f81 | |
| parent | f7334e538f39aadf3bab42244c26124a995234f7 (diff) | |
Fix checking for existing key_id; _key_id would always be set because MXF::set_key() sets it.
| -rw-r--r-- | src/smpte_subtitle_asset.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/smpte_subtitle_asset.cc b/src/smpte_subtitle_asset.cc index ea1d7426..c1138f23 100644 --- a/src/smpte_subtitle_asset.cc +++ b/src/smpte_subtitle_asset.cc @@ -306,10 +306,11 @@ SMPTESubtitleAsset::set_key (Key key) have read that file. */ auto const had_key = static_cast<bool>(_key); + auto const had_key_id = static_cast<bool>(_key_id); MXF::set_key (key); - if (!_key_id || !_file || had_key) { + if (!had_key_id || !_file || had_key) { /* Either we don't have any data to read, it wasn't encrypted, or we've already read it, so we don't need to do anything else. |
