- AVDictionary* options = 0;
- /* These durations are in microseconds, and represent how far into the content file
- we will look for streams.
- */
- 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 ());
+ AVDictionary* options = nullptr;
+ int e = avformat_open_input (&_format_context, 0, 0, &options);
+ if (e < 0) {
+ throw OpenFileError (_ffmpeg_content->path(0).string(), e, OpenFileError::READ);