summaryrefslogtreecommitdiff
path: root/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/vaapi/gstvaapidecoder_vc1.c')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_vc1.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c b/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c
index d54a18ae..96a58deb 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c
@@ -248,7 +248,7 @@ decode_sequence(GstVaapiDecoderVC1 *decoder, GstVC1BDU *rbdu, GstVC1BDU *ebdu)
GstVC1SeqStructC * const structc = &seq_hdr->struct_c;
GstVC1ParserResult result;
GstVaapiProfile profile;
- guint width, height, fps_n, fps_d;
+ guint width, height, fps_n, fps_d, par_n, par_d;
result = gst_vc1_parse_sequence_header(
rbdu->data + rbdu->offset,
@@ -275,6 +275,8 @@ decode_sequence(GstVaapiDecoderVC1 *decoder, GstVC1BDU *rbdu, GstVC1BDU *ebdu)
fps_n = 0;
fps_d = 0;
+ par_n = 0;
+ par_d = 0;
switch (seq_hdr->profile) {
case GST_VC1_PROFILE_SIMPLE:
case GST_VC1_PROFILE_MAIN:
@@ -321,6 +323,8 @@ decode_sequence(GstVaapiDecoderVC1 *decoder, GstVC1BDU *rbdu, GstVC1BDU *ebdu)
fps_d = frameratedr_table[adv_hdr->frameratedr];
}
}
+ par_n = adv_hdr->par_n;
+ par_d = adv_hdr->par_d;
break;
default:
g_assert(0 && "XXX: we already validated the profile above");
@@ -332,6 +336,9 @@ decode_sequence(GstVaapiDecoderVC1 *decoder, GstVC1BDU *rbdu, GstVC1BDU *ebdu)
gst_vaapi_decoder_set_framerate(base_decoder, priv->fps_n, priv->fps_d);
}
+ if (par_n > 0 && par_d > 0)
+ gst_vaapi_decoder_set_pixel_aspect_ratio(base_decoder, par_n, par_d);
+
switch (seq_hdr->profile) {
case GST_VC1_PROFILE_SIMPLE:
case GST_VC1_PROFILE_MAIN: