mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
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>
This commit is contained in:
parent
3f430b32a4
commit
fa87396905
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue