decoder/ffmpeg: wider try/catch in ffmpeg_scan_stream()
This commit is contained in:
parent
bce608cdbc
commit
0256bbbbaf
@ -678,23 +678,19 @@ FfmpegScanStream(AVFormatContext &format_context,
|
|||||||
|
|
||||||
static bool
|
static bool
|
||||||
ffmpeg_scan_stream(InputStream &is, TagHandler &handler) noexcept
|
ffmpeg_scan_stream(InputStream &is, TagHandler &handler) noexcept
|
||||||
{
|
try {
|
||||||
AvioStream stream(nullptr, is);
|
AvioStream stream(nullptr, is);
|
||||||
if (!stream.Open())
|
if (!stream.Open())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
AVFormatContext *f;
|
AVFormatContext *f = FfmpegOpenInput(stream.io, is.GetURI(), nullptr);
|
||||||
try {
|
|
||||||
f = FfmpegOpenInput(stream.io, is.GetURI(), nullptr);
|
|
||||||
} catch (...) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
AtScopeExit(&f) {
|
AtScopeExit(&f) {
|
||||||
avformat_close_input(&f);
|
avformat_close_input(&f);
|
||||||
};
|
};
|
||||||
|
|
||||||
return FfmpegScanStream(*f, handler);
|
return FfmpegScanStream(*f, handler);
|
||||||
|
} catch (...) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user