projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3d8501
)
Fix bad default scale when sample aspect ratio is given as 0.
author
Carl Hetherington
<cth@carlh.net>
Wed, 19 Nov 2014 14:31:25 +0000
(14:31 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 19 Nov 2014 14:31:25 +0000
(14:31 +0000)
src/lib/ffmpeg_examiner.cc
patch
|
blob
|
history
diff --git
a/src/lib/ffmpeg_examiner.cc
b/src/lib/ffmpeg_examiner.cc
index 46e93b16c322e9d469635b9d5e82cee11f366f3c..5ca05dd55e780080b421b24c44a49cc694604e5f 100644
(file)
--- a/
src/lib/ffmpeg_examiner.cc
+++ b/
src/lib/ffmpeg_examiner.cc
@@
-184,6
+184,10
@@
optional<float>
FFmpegExaminer::sample_aspect_ratio () const
{
AVRational sar = av_guess_sample_aspect_ratio (_format_context, _format_context->streams[_video_stream], 0);
+ if (sar.num == 0) {
+ /* I assume this means that we don't know */
+ return optional<float> ();
+ }
return float (sar.num) / sar.den;
}