From de0ab46fd7b9fadf8d5d6a2067c549719e2c3b58 Mon Sep 17 00:00:00 2001 From: Simon Farnsworth Date: Thu, 27 Sep 2012 18:05:46 +0100 Subject: h264: use pixel-aspect-ratio from SPS header. Propagate pixel-aspect-ratio determined by the GStreamer codecparser from the sequence headers. Signed-off-by: Simon Farnsworth Signed-off-by: Gwenole Beauchesne --- gst-libs/gst/vaapi/gstvaapidecoder_h264.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gst-libs') diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c index fc6cbf81..d0ff1ec8 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c @@ -689,6 +689,7 @@ end: static GstVaapiDecoderStatus decode_sps(GstVaapiDecoderH264 *decoder, GstH264NalUnit *nalu) { + GstVaapiDecoder * const base_decoder = GST_VAAPI_DECODER(decoder); GstVaapiDecoderH264Private * const priv = decoder->priv; GstH264SPS * const sps = &priv->last_sps; GstH264ParserResult result; @@ -703,6 +704,11 @@ decode_sps(GstVaapiDecoderH264 *decoder, GstH264NalUnit *nalu) if (result != GST_H264_PARSER_OK) return get_status(result); + gst_vaapi_decoder_set_pixel_aspect_ratio( + base_decoder, + sps->vui_parameters.par_n, + sps->vui_parameters.par_d + ); return ensure_context(decoder, sps); } -- cgit v1.2.3