mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 21:28:45 +00:00
qtdemux: set the pixel-aspect-ratio field also for par=1/1
https://bugzilla.gnome.org/show_bug.cgi?id=625302
This commit is contained in:
parent
8696d10a5b
commit
e6d7e69844
1 changed files with 5 additions and 5 deletions
|
@ -3981,12 +3981,12 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux,
|
||||||
/* calculate the pixel aspect ratio using the display and pixel w/h */
|
/* calculate the pixel aspect ratio using the display and pixel w/h */
|
||||||
n = stream->display_width * stream->height;
|
n = stream->display_width * stream->height;
|
||||||
d = stream->display_height * stream->width;
|
d = stream->display_height * stream->width;
|
||||||
if (n != d) {
|
if (n == d)
|
||||||
|
n = d = 1;
|
||||||
GST_DEBUG_OBJECT (qtdemux, "setting PAR to %d/%d", n, d);
|
GST_DEBUG_OBJECT (qtdemux, "setting PAR to %d/%d", n, d);
|
||||||
gst_caps_set_simple (stream->caps, "pixel-aspect-ratio",
|
gst_caps_set_simple (stream->caps, "pixel-aspect-ratio",
|
||||||
GST_TYPE_FRACTION, n, d, NULL);
|
GST_TYPE_FRACTION, n, d, NULL);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* qt file might have pasp atom */
|
/* qt file might have pasp atom */
|
||||||
if (stream->par_w > 0 && stream->par_h > 0) {
|
if (stream->par_w > 0 && stream->par_h > 0) {
|
||||||
|
|
Loading…
Reference in a new issue