File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/AvTranscoder/transcoder Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -335,7 +335,7 @@ ProfileLoader::Profile Transcoder::getProfileFromInputs(const std::vector<InputS
335
335
assert (inputStreamDescArray.size () >= 1 );
336
336
337
337
// Get properties from the first input
338
- size_t nonEmptyFileName = 0 ;
338
+ size_t nonEmptyFileName = - 1 ;
339
339
for (size_t i = 0 ; i < inputStreamDescArray.size (); ++i)
340
340
{
341
341
if (!inputStreamDescArray.at (i)._filename .empty ())
@@ -344,6 +344,9 @@ ProfileLoader::Profile Transcoder::getProfileFromInputs(const std::vector<InputS
344
344
break ;
345
345
}
346
346
}
347
+ if (nonEmptyFileName == -1 )
348
+ throw std::runtime_error (" Cannot handle only empty streams as input" );
349
+
347
350
const InputStreamDesc& inputStreamDesc = inputStreamDescArray.at (nonEmptyFileName);
348
351
InputFile inputFile (inputStreamDesc._filename );
349
352
You can’t perform that action at this time.
0 commit comments