From 9e8857a37c10504d15926bb5bae0de29ff46fbe4 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Wed, 4 Mar 2015 18:58:50 +0000 Subject: [PATCH] Add new error message --- lib/LibAvContextHandle.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/LibAvContextHandle.cpp b/lib/LibAvContextHandle.cpp index 8f10c7c..dd250d9 100644 --- a/lib/LibAvContextHandle.cpp +++ b/lib/LibAvContextHandle.cpp @@ -220,12 +220,12 @@ Bool LibAvContextHandle::initAvFormat( const char* filename, UInt& width, UInt& m_uiSecs = duration / AV_TIME_BASE; num_frames = m_uiSecs * frame_rate; m_uiMicroSec = duration % AV_TIME_BASE; - num_frames = num_frames == 0 ? 1 : num_frames; } else { num_frames = 0; } + num_frames = num_frames == 0 ? 1 : num_frames; Int pix_fmt = video_dec_ctx->pix_fmt; switch( pix_fmt ) @@ -255,6 +255,7 @@ Bool LibAvContextHandle::initAvFormat( const char* filename, UInt& width, UInt& } if( pixel_format == PlaYUVerFrame::NO_FMT ) { + throw "Cannot open file using FFmpeg libs - unsupported pixel format"; closeAvFormat(); return false; }