From e0ac920c87d97c213d25f45d945cbb6288a8143a Mon Sep 17 00:00:00 2001 From: Kevin Backhouse Date: Sun, 12 Mar 2023 10:54:01 +0000 Subject: [PATCH] Suggestion from @neheb --- src/matroskavideo.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/matroskavideo.cpp b/src/matroskavideo.cpp index d9615426..7441ce0a 100644 --- a/src/matroskavideo.cpp +++ b/src/matroskavideo.cpp @@ -811,11 +811,9 @@ void MatroskaVideo::decodeBooleanTags(const MatroskaTag* tag, const byte* buf) { switch (tag->_id) { case TrackType: // this tags is used internally only to deduce the type of track (video or audio) - internalMt = Exiv2::find(matroskaTrackType, key); - if (internalMt) { - stream_ = internalMt->_id; + if (auto f = Exiv2::find(matroskaTrackType, key)) { + stream_ = f->_id; } - internalMt = nullptr; break; case TrackUsed: internalMt = Exiv2::find(trackEnable, key);