From 5bb6e8b55554be9fcbefa65f20d074c94e3ce3d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Mei=C3=9Fner?= Date: Fri, 26 Dec 2014 20:44:21 +0100 Subject: [PATCH] Fix strcmp --- Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.cpp b/Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.cpp index d9d23290..91c97a90 100644 --- a/Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.cpp +++ b/Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.cpp @@ -253,7 +253,7 @@ bool plMoviePlayer::ILoadAudio() fAudioSound.reset(new plWin32VideoSound(header)); // Initialize Opus - if (strcmp(audio->GetCodecId(), WEBM_CODECID_OPUS) != 0) { + if (strncmp(audio->GetCodecId(), WEBM_CODECID_OPUS, arrsize(WEBM_CODECID_OPUS)) != 0) { plStatusLog::AddLineS("movie.log", "%s: Not an Opus audio track!", fMoviePath.AsString().c_str()); return false; } @@ -343,7 +343,7 @@ bool plMoviePlayer::Start() // Initialize VPX const mkvparser::VideoTrack* video = static_cast(fVideoTrack->GetTrack()); - if (strcmp(video->GetCodecId(), WEBM_CODECID_VP9) != 0) { + if (strncmp(video->GetCodecId(), WEBM_CODECID_VP9, arrsize(WEBM_CODECID_VP9)) != 0) { plStatusLog::AddLineS("movie.log", "%s: Not a VP9 video track!", fMoviePath.AsString().c_str()); return false; }