Permalink
Browse files

Add three missing SAR values defined in the H.264 spec to H264Parser:…

…:aspectRatio() fixes incorrect display aspect ratio for some videos and recordings.

(cherry picked from commit 0a56d7f)
  • Loading branch information...
1 parent cf06841 commit 96af9b06b00b749cb80589486eab6eb3d01da358 @stuartm stuartm committed Sep 16, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 mythtv/libs/libmythtv/mpeg/H264Parser.cpp
@@ -1297,6 +1297,18 @@ uint H264Parser::aspectRatio(void) const
// 160:99
aspect *= 1.6161616161616161;
break;
+ case 14:
+ // 4:3
+ aspect *= 1.3333333333333333;
+ break;
+ case 15:
+ // 3:2
+ aspect *= 1.5;
+ break;
+ case 16:
+ // 2:1
+ aspect *= 2.0;
+ break;
case EXTENDED_SAR:
if (sar_height)
aspect *= sar_width / (double)sar_height;

0 comments on commit 96af9b0

Please sign in to comment.