From 513947df0f421c086ac56dff48dfe540b0a380c2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 18 Aug 2016 17:02:33 +0100 Subject: Better errors on open fails; remove unused exception. --- src/lib/ffmpeg.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib/ffmpeg.cc') diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc index 1f16514d7..f750cfd58 100644 --- a/src/lib/ffmpeg.cc +++ b/src/lib/ffmpeg.cc @@ -131,8 +131,9 @@ FFmpeg::setup_general () av_dict_set (&options, "analyzeduration", raw_convert (5 * 60 * 1000000).c_str(), 0); av_dict_set (&options, "probesize", raw_convert (5 * 60 * 1000000).c_str(), 0); - if (avformat_open_input (&_format_context, 0, 0, &options) < 0) { - throw OpenFileError (_ffmpeg_content->path(0).string ()); + int e = avformat_open_input (&_format_context, 0, 0, &options); + if (e < 0) { + throw OpenFileError (_ffmpeg_content->path(0).string(), e); } if (avformat_find_stream_info (_format_context, 0) < 0) { -- cgit v1.2.3