Do not use exceptions when scan file error occurs
This commit is contained in:
@@ -87,14 +87,17 @@ InputFormatContext::getBestStreamIdx(AVMediaType type, Stream::Idx& index)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
InputFormatContext::findStreamInfo(void)
|
||||
{
|
||||
AvError err = avformat_find_stream_info(native(), NULL);
|
||||
if (err) {
|
||||
if (err)
|
||||
{
|
||||
LMS_LOG(MOD_AV, SEV_ERROR) << "Couldn't find stream information: " << err;
|
||||
throw std::runtime_error("av_find_stream_info failed!");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class InputFormatContext : public FormatContext
|
||||
Dictionary getMetadata(void); // metadata access
|
||||
|
||||
// Scan file
|
||||
void findStreamInfo();
|
||||
bool findStreamInfo();
|
||||
|
||||
|
||||
// Get attached pictures
|
||||
|
||||
Reference in New Issue
Block a user