diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-08-18 17:02:33 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-08-18 17:02:33 +0100 |
| commit | 513947df0f421c086ac56dff48dfe540b0a380c2 (patch) | |
| tree | 5fd393d3833a512dffacbeb2bb11eafe4003440e /src/lib/ffmpeg.cc | |
| parent | 6c16feca6c9b51b4833051eff4b5f6a9e9454a73 (diff) | |
Better errors on open fails; remove unused exception.
Diffstat (limited to 'src/lib/ffmpeg.cc')
| -rw-r--r-- | src/lib/ffmpeg.cc | 5 |
1 files changed, 3 insertions, 2 deletions
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<string> (5 * 60 * 1000000).c_str(), 0); av_dict_set (&options, "probesize", raw_convert<string> (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) { |
