From 1abbaf20927e3410eb12f8d29b3836e587fb785d Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Mon, 4 Apr 2016 17:37:21 +0100 Subject: [PATCH] Check number of inputs for quality --- tools/PlaYUVerTools.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/PlaYUVerTools.cpp b/tools/PlaYUVerTools.cpp index 30a684d..71847b9 100644 --- a/tools/PlaYUVerTools.cpp +++ b/tools/PlaYUVerTools.cpp @@ -184,11 +184,11 @@ Int PlaYUVerTools::Open( Int argc, Char *argv[] ) if( m_cCmdLineHandler.Opts()["quality"]->count() ) { std::string qualityMetric = m_cCmdLineHandler.m_strQualityMetric; -// if( m_apcInputStreams.size() != 2 ) -// { -// m_cCmdLineHandler.log( LOG_ERROR, "Invalid number of inputs! " ); -// return 2; -// } + if( m_apcInputStreams.size() < 2 ) + { + m_cCmdLineHandler.log( LOG_ERROR, "Invalid number of inputs! " ); + return 2; + } for( UInt i = 0; i < PlaYUVerFrame::supportedQualityMetricsList().size(); i++ ) { if( lowercase( PlaYUVerFrame::supportedQualityMetricsList()[i] ) == lowercase( qualityMetric ) )