Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4d4ca1e

Browse files
author
Valentin NOEL
committed
Transcoder: handle empty filnames only case
1 parentdd89b56 commit4d4ca1e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/AvTranscoder/transcoder/Transcoder.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ ProfileLoader::Profile Transcoder::getProfileFromInputs(const std::vector<InputS
335335
assert(inputStreamDescArray.size() >=1);
336336

337337
// Get properties from the first input
338-
size_t nonEmptyFileName =0;
338+
size_t nonEmptyFileName =-1;
339339
for(size_t i =0; i < inputStreamDescArray.size(); ++i)
340340
{
341341
if(!inputStreamDescArray.at(i)._filename.empty())
@@ -344,6 +344,9 @@ ProfileLoader::Profile Transcoder::getProfileFromInputs(const std::vector<InputS
344344
break;
345345
}
346346
}
347+
if(nonEmptyFileName == -1)
348+
throwstd::runtime_error("Cannot handle only empty streams as input");
349+
347350
const InputStreamDesc& inputStreamDesc = inputStreamDescArray.at(nonEmptyFileName);
348351
InputFileinputFile(inputStreamDesc._filename);
349352

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp