summaryrefslogtreecommitdiff
path: root/gst-libs/gst
diff options
context:
space:
mode:
authorSimon Farnsworth <simon.farnsworth@onelan.co.uk>2012-09-27 18:05:46 +0100
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-11-16 16:50:30 +0100
commitde0ab46fd7b9fadf8d5d6a2067c549719e2c3b58 (patch)
tree62a519da75d88a957dda9fa3f9b71a488bcc99cf /gst-libs/gst
parentfdcad30281cd70a33caa830fc35f173f0da77311 (diff)
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 <simon.farnsworth@onelan.co.uk> Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Diffstat (limited to 'gst-libs/gst')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_h264.c6
1 files changed, 6 insertions, 0 deletions
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);
}