X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Frender_subtitles.cc;h=56343cd507c9a25e6d202aee383a0e353e4eb430;hb=f59ae2d9793699fd0e18f9e53ff362c26c2ef00c;hp=9c4617ac3bd97d15bd9684d378638f5042983fa2;hpb=1d7a98b5c7537b4874645c56cd83ece9f78625f5;p=dcpomatic.git diff --git a/src/lib/render_subtitles.cc b/src/lib/render_subtitles.cc index 9c4617ac3..56343cd50 100644 --- a/src/lib/render_subtitles.cc +++ b/src/lib/render_subtitles.cc @@ -123,7 +123,8 @@ render_line (list subtitles, list > fonts, dcp: /* ...and add a bit more for luck */ height += target.height / 11; - shared_ptr image (new Image (AV_PIX_FMT_RGBA, dcp::Size (target.width, height), false)); + /* FFmpeg BGRA means first byte blue, second byte green, third byte red, fourth byte alpha */ + shared_ptr image (new Image (AV_PIX_FMT_BGRA, dcp::Size (target.width, height), false)); image->make_black (); #ifdef DCPOMATIC_HAVE_FORMAT_STRIDE_FOR_WIDTH @@ -132,6 +133,7 @@ render_line (list subtitles, list > fonts, dcp: Cairo::FORMAT_ARGB32, image->size().width, image->size().height, + /* Cairo ARGB32 means first byte blue, second byte green, third byte red, fourth byte alpha */ Cairo::ImageSurface::format_stride_for_width (Cairo::FORMAT_ARGB32, image->size().width) ); #else