summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_content.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ffmpeg_content.cc')
-rw-r--r--src/lib/ffmpeg_content.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc
index 2233f5f8c..cbeebd817 100644
--- a/src/lib/ffmpeg_content.cc
+++ b/src/lib/ffmpeg_content.cc
@@ -274,6 +274,18 @@ FFmpegContent::examine (shared_ptr<Job> job)
_color_trc = examiner->color_trc ();
_colorspace = examiner->colorspace ();
_bits_per_pixel = examiner->bits_per_pixel ();
+
+ if (examiner->rotation()) {
+ double rot = *examiner->rotation ();
+ if (fabs (rot - 180) < 1.0) {
+ _filters.push_back (Filter::from_id ("vflip"));
+ _filters.push_back (Filter::from_id ("hflip"));
+ } else if (fabs (rot - 90) < 1.0) {
+ _filters.push_back (Filter::from_id ("90clock"));
+ } else if (fabs (rot - 270) < 1.0) {
+ _filters.push_back (Filter::from_id ("90anticlock"));
+ }
+ }
}
if (!examiner->audio_streams().empty ()) {