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 authored and jyavenard committed Mar 8, 2013
1 parent d59a3fd commit e55bdaf
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 e55bdaf

Please sign in to comment.