diff options
Diffstat (limited to 'src/lib/video_content.cc')
| -rw-r--r-- | src/lib/video_content.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index 36438fc2a..8ccb921d0 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -241,10 +241,14 @@ VideoContent::take_from_examiner (shared_ptr<VideoExaminer> d) _sample_aspect_ratio = ar; _yuv = yuv; - /* Guess correct scale from size and sample aspect ratio */ - _scale = VideoContentScale ( - Ratio::nearest_from_ratio (double (_size.width) * ar.get_value_or (1) / _size.height) - ); + if (Config::instance()->default_scale_to ()) { + _scale = VideoContentScale (Config::instance()->default_scale_to ()); + } else { + /* Guess correct scale from size and sample aspect ratio */ + _scale = VideoContentScale ( + Ratio::nearest_from_ratio (double (_size.width) * ar.get_value_or (1) / _size.height) + ); + } } LOG_GENERAL ("Video length obtained from header as %1 frames", _length); |
