mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
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.
This commit is contained in:
parent
7a9410f826
commit
b003a2bab2
1 changed files with 5 additions and 0 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue