diff options
author | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2008-07-18 20:03:07 +0000 |
---|---|---|
committer | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2008-07-18 20:03:07 +0000 |
commit | 964f855f8be524a4e3bb501ca68bb3dcdec2b400 (patch) | |
tree | 44482517dd924ce6e7eeea820d77eb14258a2bde | |
parent | 4511fdb05d81e988329597fbf94b6723bdf3b480 (diff) |
gst/qtdemux/qtdemux.c: Revert ISO base media spec based pixel-aspect-ratio calculation.
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (gst_qtdemux_add_stream),
(qtdemux_parse_trak):
Revert ISO base media spec based pixel-aspect-ratio calculation.
Fixes #543300.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | gst/qtdemux/qtdemux.c | 32 |
2 files changed, 7 insertions, 32 deletions
@@ -1,3 +1,10 @@ +2008-07-18 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> + + * gst/qtdemux/qtdemux.c: (gst_qtdemux_add_stream), + (qtdemux_parse_trak): + Revert ISO base media spec based pixel-aspect-ratio calculation. + Fixes #543300. + 2008-07-17 Edward Hervey <edward.hervey@collabora.co.uk> * sys/osxvideo/osxvideosink.m: diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index d5e03825..88f3415e 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -136,9 +136,6 @@ struct _QtDemuxStream /* video info */ gint width; gint height; - /* aspect ratio */ - gint display_width; - gint display_height; /* Numerator/denominator framerate */ gint fps_n; gint fps_d; @@ -2675,25 +2672,6 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux, "height", G_TYPE_INT, stream->height, "framerate", GST_TYPE_FRACTION, stream->fps_n, stream->fps_d, NULL); - /* calculate pixel-aspect-ratio using display width and height */ - GST_DEBUG_OBJECT (qtdemux, "video size %dx%d, target display size %dx%d", - stream->width, stream->height, - stream->display_width, stream->display_height); - - if (stream->display_width > 0 && stream->display_height > 0 && - stream->width > 0 && stream->height > 0) { - gint n, d; - - /* calculate the pixel aspect ratio using the display and pixel w/h */ - n = stream->display_width * stream->height; - d = stream->display_height * stream->width; - if (n != d) { - GST_DEBUG_OBJECT (qtdemux, "setting PAR to %d/%d", n, d); - gst_caps_set_simple (stream->caps, "pixel-aspect-ratio", - GST_TYPE_FRACTION, n, d, NULL); - } - } - depth = stream->bits_per_sample; /* more than 32 bits means grayscale */ @@ -3273,8 +3251,6 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) if (stream->subtype == FOURCC_vide) { guint32 fourcc; - const guint8 *tkhd_data = (const guint8 *) tkhd->data; - guint8 version; stream->sampled = TRUE; @@ -3293,14 +3269,6 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) GST_LOG_OBJECT (qtdemux, "frame count: %u", QT_UINT16 (stsd_data + offset + 48)); - version = QT_UINT8 (tkhd_data + 8); - if (version == 1) - offset = 96; - else - offset = 84; - stream->display_width = (guint) QT_FP32 (tkhd_data + offset); - stream->display_height = (guint) QT_FP32 (tkhd_data + offset + 4); - if (fourcc == FOURCC_drms) goto error_encrypted; |