Skip to content

Commit

Permalink
Calculate h.264 aspect ratio using cropped dimensions.
Browse files Browse the repository at this point in the history
Otherwise the aspect ratio may change from 1920/1080 to 1920/1088 and
lead to anomalous rescaling.
  • Loading branch information
stichnot committed Mar 6, 2013
1 parent 0a4e3e4 commit 5b42adb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mpeg/H264Parser.cpp
Expand Up @@ -1252,7 +1252,7 @@ uint H264Parser::aspectRatio(void) const
double aspect = 0.0;

if (pic_height)
aspect = pic_width / (double)pic_height;
aspect = pictureWidthCropped() / (double)pictureHeightCropped();

switch (aspect_ratio_idc)
{
Expand Down

0 comments on commit 5b42adb

Please sign in to comment.