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.
  • Loading branch information...
stuartm committed Sep 16, 2012
1 parent 9b526cc commit 0a56d7fe859df287437573f5035ca54cc1be19e8
Showing with 12 additions and 0 deletions.
  1. +12 −0 mythtv/libs/libmythtv/mpeg/H264Parser.cpp
@@ -1293,6 +1293,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 0a56d7f

Please sign in to comment.