Commit 32da0705 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #15102 from dgel:force_input_format_ffmpeg

parents ba1a48c2 96a27f42
...@@ -891,7 +891,14 @@ bool CvCapture_FFMPEG::open( const char* _filename ) ...@@ -891,7 +891,14 @@ bool CvCapture_FFMPEG::open( const char* _filename )
#else #else
av_dict_set(&dict, "rtsp_transport", "tcp", 0); av_dict_set(&dict, "rtsp_transport", "tcp", 0);
#endif #endif
int err = avformat_open_input(&ic, _filename, NULL, &dict); AVInputFormat* input_format = NULL;
AVDictionaryEntry* entry = av_dict_get(dict, "input_format", NULL, 0);
if (entry != 0)
{
input_format = av_find_input_format(entry->value);
}
int err = avformat_open_input(&ic, _filename, input_format, &dict);
#else #else
int err = av_open_input_file(&ic, _filename, NULL, 0, NULL); int err = av_open_input_file(&ic, _filename, NULL, 0, NULL);
#endif #endif
......
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