summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
-rw-r--r--src/lib/ffmpeg_decoder.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index 034fefeb2..ba875711a 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -155,8 +155,15 @@ FFmpegDecoder::setup_video ()
if (_video_codec == 0) {
throw DecodeError ("could not find video decoder");
}
+
+ /* I think this prevents problems with green hash on decodes and
+ "changing frame properties on the fly is not supported by all filters"
+ messages with some content.
+ */
+ AVDictionary* opts = 0;
+ av_dict_set (&opts, "threads", "1", 0);
- if (avcodec_open2 (_video_codec_context, _video_codec, 0) < 0) {
+ if (avcodec_open2 (_video_codec_context, _video_codec, &opts) < 0) {
throw DecodeError ("could not open video decoder");
}
}