mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 16:21:17 +00:00
mpegvideoparser: Fix the pixel-aspect-ratio calculation
Ignore the display_extension values if they are greater than the width/height values provided by seqhdr and calculate the PAR based on the seqhdr values.T his is what DVD players are doing. Thanks to "David Schleef <ds@schleef.org>" https://bugzilla.gnome.org/show_bug.cgi?id=685103
This commit is contained in:
parent
bdb4de3a6d
commit
0a496f4167
1 changed files with 8 additions and 3 deletions
|
@ -492,9 +492,14 @@ gst_mpeg_video_finalise_mpeg2_sequence_header (GstMpegVideoSequenceHdr * seqhdr,
|
|||
w = seqhdr->width;
|
||||
h = seqhdr->height;
|
||||
if (displayext) {
|
||||
/* Use the display size for calculating PAR when display ext present */
|
||||
w = displayext->display_horizontal_size;
|
||||
h = displayext->display_vertical_size;
|
||||
/* Use the display size for calculating PAR when display ext present.
|
||||
* But we are handling this like what DVD players are doing. Which means,
|
||||
* ignore the display extension values if they are greater than the width/height
|
||||
* values provided by seqhdr and calculate the PAR based on the seqhdr values. */
|
||||
if (displayext->display_horizontal_size < w)
|
||||
w = displayext->display_horizontal_size;
|
||||
if (displayext->display_vertical_size < h)
|
||||
h = displayext->display_vertical_size;
|
||||
}
|
||||
|
||||
/* Pixel_width = DAR_width * display_vertical_size */
|
||||
|
|
Loading…
Reference in a new issue