Skip to content

Commit

Permalink
Add three missing SAR values defined in the H.264 spec to H264Parser:…
Browse files Browse the repository at this point in the history
…:aspectRatio() fixes incorrect display aspect ratio for some videos and recordings.
  • Loading branch information
stuartm committed Sep 16, 2012
1 parent 9b526cc commit 0a56d7f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mythtv/libs/libmythtv/mpeg/H264Parser.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 0a56d7f

Please sign in to comment.