Add a premultiply filter to sources with an alpha channel (#2681).
[dcpomatic.git] / src / lib / ffmpeg_content.cc
index ceebb5572ed03df1a176629eec4d4f940d236482..20fe7776bd9aafb80ca12c0fbd035875c0551aaf 100644 (file)
@@ -299,6 +299,9 @@ FFmpegContent::examine (shared_ptr<const Film> film, shared_ptr<Job> job)
                                        _filters.push_back(*Filter::from_id("90anticlock"));
                                }
                        }
+                       if (examiner->has_alpha()) {
+                               _filters.push_back(*Filter::from_id("premultiply"));
+                       }
                }
 
                if (!examiner->audio_streams().empty()) {