Commit 0256bbbb authored by Max Kellermann's avatar Max Kellermann

decoder/ffmpeg: wider try/catch in ffmpeg_scan_stream()

parent bce608cd
......@@ -678,23 +678,19 @@ FfmpegScanStream(AVFormatContext &format_context,
static bool
ffmpeg_scan_stream(InputStream &is, TagHandler &handler) noexcept
{
try {
AvioStream stream(nullptr, is);
if (!stream.Open())
return false;
AVFormatContext *f;
try {
f = FfmpegOpenInput(stream.io, is.GetURI(), nullptr);
} catch (...) {
return false;
}
AVFormatContext *f = FfmpegOpenInput(stream.io, is.GetURI(), nullptr);
AtScopeExit(&f) {
avformat_close_input(&f);
};
return FfmpegScanStream(*f, handler);
} catch (...) {
return false;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment