summaryrefslogtreecommitdiff
path: root/gst-libs/gst/vaapi
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-03-28 19:15:47 +0200
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-03-28 19:41:28 +0200
commitb003a2bab28a156032e9c888d8d5a48eb833d980 (patch)
treebf2ac2423c5dc114498a1d5752ca0e94e899206b /gst-libs/gst/vaapi
parent7a9410f826c852377a5214dc21203dc07d250d08 (diff)
mpeg2: fix invalid interlaced frame in progressive sequence.
Some streams, badly constructed, could have signaled an interlaced frame while the sequence was meant to be progressive. Warn and force frame to be progressive in this case.
Diffstat (limited to 'gst-libs/gst/vaapi')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c
index b2a6367d..dbf66dd3 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c
@@ -577,6 +577,11 @@ decode_picture_ext(GstVaapiDecoderMpeg2 *decoder, guchar *buf, guint buf_size)
}
priv->has_pic_ext = TRUE;
+ if (priv->progressive_sequence && !pic_ext->progressive_frame) {
+ GST_WARNING("invalid interlaced frame in progressive sequence, fixing");
+ pic_ext->progressive_frame = 1;
+ }
+
if (pic_ext->picture_structure == 0 ||
(pic_ext->progressive_frame &&
pic_ext->picture_structure != GST_MPEG_VIDEO_PICTURE_STRUCTURE_FRAME)) {