From 80196e1bb8892a9a72890078530099d6e016f2cd Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Thu, 30 Jul 2009 00:04:43 -0300 Subject: asfmux: Fixes video stream properties object Fixes stream properties object creation for video content --- gst/asfmux/gstasfmux.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gst/asfmux') diff --git a/gst/asfmux/gstasfmux.c b/gst/asfmux/gstasfmux.c index 32581221..33f2c74d 100644 --- a/gst/asfmux/gstasfmux.c +++ b/gst/asfmux/gstasfmux.c @@ -786,8 +786,8 @@ gst_asf_mux_write_stream_properties (GstAsfMux * asfmux, guint8 ** buf, videopad->vidinfo.height * videopad->vidinfo.bit_cnt); GST_WRITE_UINT32_LE (*buf + 35, videopad->vidinfo.xpels_meter); GST_WRITE_UINT32_LE (*buf + 39, videopad->vidinfo.ypels_meter); - GST_WRITE_UINT32_LE (*buf + 41, videopad->vidinfo.num_colors); - GST_WRITE_UINT32_LE (*buf + 45, videopad->vidinfo.num_colors); + GST_WRITE_UINT32_LE (*buf + 43, videopad->vidinfo.num_colors); + GST_WRITE_UINT32_LE (*buf + 47, videopad->vidinfo.imp_colors); *buf += ASF_VIDEO_SPECIFIC_DATA_SIZE; } @@ -2054,6 +2054,8 @@ gst_asf_mux_video_set_caps (GstPad * pad, GstCaps * caps) if (strcmp (caps_name, "video/x-wmv") == 0) { guint32 fourcc; + videopad->vidinfo.bit_cnt = 24; + /* in case we have a fourcc, we use it */ if (gst_structure_get_fourcc (structure, "format", &fourcc)) { videopad->vidinfo.compression = fourcc; @@ -2061,8 +2063,6 @@ gst_asf_mux_video_set_caps (GstPad * pad, GstCaps * caps) gint version; if (!gst_structure_get_int (structure, "wmvversion", &version)) goto refuse_caps; - - videopad->vidinfo.bit_cnt = 24; if (version == 2) { videopad->vidinfo.compression = GST_MAKE_FOURCC ('W', 'M', 'V', '2'); } else if (version == 1) { -- cgit v1.2.1