Try running the video codec with threads=1 to see if we can avoid green stuff in...
authorCarl Hetherington <cth@carlh.net>
Wed, 24 Oct 2012 23:36:47 +0000 (00:36 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 24 Oct 2012 23:36:47 +0000 (00:36 +0100)
src/lib/ffmpeg_decoder.cc

index 034fefeb2cd37215e0bba8c9a3d757f999f0442e..ba875711ad53a5db7f5ea02ed410e1297b47568e 100644 (file)
@@ -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");
        }
 }