gst/matroska/matroska-mux.c: Look for pixel-aspect-ratio in caps, not pixel_width and pixel_height (Fixes: #322645)

Original commit message from CVS:
* gst/matroska/matroska-mux.c:
(gst_matroska_mux_video_pad_setcaps):
Look for pixel-aspect-ratio in caps, not pixel_width and
pixel_height (Fixes: #322645)
This commit is contained in:
Jan Schmidt 2005-11-28 15:13:22 +00:00
parent bad1f0307a
commit 96d5f727fe
3 changed files with 10 additions and 5 deletions

View file

@ -1,3 +1,10 @@
2005-11-28 Jan Schmidt <thaytan@mad.scientist.com>
* gst/matroska/matroska-mux.c:
(gst_matroska_mux_video_pad_setcaps):
Look for pixel-aspect-ratio in caps, not pixel_width and
pixel_height (Fixes: #322645)
2005-11-28 Jan Schmidt <thaytan@mad.scientist.com> 2005-11-28 Jan Schmidt <thaytan@mad.scientist.com>
* gst/matroska/matroska-mux.c: * gst/matroska/matroska-mux.c:

2
common

@ -1 +1 @@
Subproject commit c04ad83a0c184fcd311de39371570b9e773a60d0 Subproject commit b0b08bcd66ca385364b6f90663585b09693aec67

View file

@ -426,7 +426,6 @@ gst_matroska_mux_video_pad_setcaps (GstPad * pad, GstCaps * caps)
gint width, height, pixel_width, pixel_height; gint width, height, pixel_width, pixel_height;
const GValue *framerate; const GValue *framerate;
GstStructure *structure; GstStructure *structure;
gboolean ret;
/* find context */ /* find context */
collect_pad = (GstMatroskaPad *) gst_pad_get_element_private (pad); collect_pad = (GstMatroskaPad *) gst_pad_get_element_private (pad);
@ -454,9 +453,8 @@ gst_matroska_mux_video_pad_setcaps (GstPad * pad, GstCaps * caps)
gst_value_get_fraction_denominator (framerate), gst_value_get_fraction_denominator (framerate),
gst_value_get_fraction_numerator (framerate)); gst_value_get_fraction_numerator (framerate));
ret = gst_structure_get_int (structure, "pixel_width", &pixel_width); if (gst_structure_get_fraction (structure, "pixel-aspect-ratio",
ret &= gst_structure_get_int (structure, "pixel_height", &pixel_height); &pixel_width, &pixel_height)) {
if (ret) {
if (pixel_width > pixel_height) { if (pixel_width > pixel_height) {
videocontext->display_width = width * pixel_width / pixel_height; videocontext->display_width = width * pixel_width / pixel_height;
videocontext->display_height = height; videocontext->display_height = height;