projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Hand-apply 80562fe5dce5fd625da583ca6f7c2833f9db8754 from master (remove default scale...
[dcpomatic.git]
/
src
/
lib
/
ffmpeg_examiner.cc
diff --git
a/src/lib/ffmpeg_examiner.cc
b/src/lib/ffmpeg_examiner.cc
index 48d85da6f11113cb6cabc83215505c8df766110a..46e93b16c322e9d469635b9d5e82cee11f366f3c 100644
(file)
--- a/
src/lib/ffmpeg_examiner.cc
+++ b/
src/lib/ffmpeg_examiner.cc
@@
-180,6
+180,13
@@
FFmpegExaminer::video_length () const
return ContentTime (max (ContentTime::Type (1), length.get ()));
}
return ContentTime (max (ContentTime::Type (1), length.get ()));
}
+optional<float>
+FFmpegExaminer::sample_aspect_ratio () const
+{
+ AVRational sar = av_guess_sample_aspect_ratio (_format_context, _format_context->streams[_video_stream], 0);
+ return float (sar.num) / sar.den;
+}
+
string
FFmpegExaminer::audio_stream_name (AVStream* s) const
{
string
FFmpegExaminer::audio_stream_name (AVStream* s) const
{