Permalink
Browse files

Apply the pixel aspect ratio, if available, to aspect ratio calculation.

This only applies to mpeg2 video.  Refs #11406.
  • Loading branch information...
stichnot committed Mar 9, 2013
1 parent 0d9312d commit 44474a1714e459f83cf7b25bc856fba196675e51
Showing with 3 additions and 0 deletions.
  1. +3 −0 mythtv/libs/libmythtv/avformatdecoder.cpp
@@ -3019,6 +3019,9 @@ void AvFormatDecoder::MpegPreProcessPkt(AVStream *stream, AVPacket *pkt)
uint height = seq->height() >> context->lowres;
current_aspect = seq->aspect(context->codec_id ==
AV_CODEC_ID_MPEG1VIDEO);
if (stream->sample_aspect_ratio.num)
current_aspect = av_q2d(stream->sample_aspect_ratio) *
width / height;
if (aspect_override > 0.0f)
current_aspect = aspect_override;
float seqFPS = seq->fps();

0 comments on commit 44474a1

Please sign in to comment.