From 033a675bcce62e00ecb0d8d53f00386873070975 Mon Sep 17 00:00:00 2001 From: Sreerenj Balachandran Date: Sun, 12 Feb 2012 11:21:52 +0200 Subject: [PATCH] mpeg2: fix size calculation from sequence_extension(). Original values from sequence_header() are 12-bit and the remaining 2 most significant bits are coming from sequence_extension(). Signed-off-by: Gwenole Beauchesne --- gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c index b2579b3b54..e98a3f4a09 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c @@ -396,8 +396,8 @@ decode_sequence_ext(GstVaapiDecoderMpeg2 *decoder, guchar *buf, guint buf_size) priv->has_seq_ext = TRUE; priv->progressive_sequence = seq_ext->progressive; - width = (priv->width & 0xffff) | ((guint32)seq_ext->horiz_size_ext << 16); - height = (priv->height & 0xffff) | ((guint32)seq_ext->vert_size_ext << 16); + width = (priv->width & 0x0fff) | ((guint32)seq_ext->horiz_size_ext << 12); + height = (priv->height & 0x0fff) | ((guint32)seq_ext->vert_size_ext << 12); GST_DEBUG("video resolution %ux%u", width, height); if (seq_ext->fps_n_ext && seq_ext->fps_d_ext) {