mpeg2: use pixel-aspec-ratio information from bitstream parser.
authorSimon Farnsworth <simon.farnsworth@onelan.co.uk>
Thu, 27 Sep 2012 17:05:46 +0000 (18:05 +0100)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 11 Oct 2012 12:58:38 +0000 (14:58 +0200)
Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c

index 928c64f..7b47905 100644 (file)
@@ -519,6 +519,12 @@ decode_sequence(GstVaapiDecoderMpeg2 *decoder, guchar *buf, guint buf_size)
     pts_set_framerate(&priv->tsg, priv->fps_n, priv->fps_d);
     gst_vaapi_decoder_set_framerate(base_decoder, priv->fps_n, priv->fps_d);
 
+    gst_vaapi_decoder_set_pixel_aspect_ratio(
+        base_decoder,
+        seq_hdr->par_w,
+        seq_hdr->par_h
+    );
+
     priv->width                 = seq_hdr->width;
     priv->height                = seq_hdr->height;
     priv->has_seq_ext           = FALSE;