mpeg2dec: update for new interlaced flags

This commit is contained in:
Wim Taymans 2011-12-19 18:20:56 +01:00
parent d701123063
commit aed83a1954

View file

@ -499,7 +499,9 @@ handle_sequence (GstMpeg2dec * mpeg2dec, const mpeg2_info_t * info)
mpeg2dec->frame_period = sequence->frame_period * GST_USECOND / 27;
if (!(sequence->flags & SEQ_FLAG_PROGRESSIVE_SEQUENCE))
vinfo.flags |= GST_VIDEO_FLAG_INTERLACED;
vinfo.interlace_mode = GST_VIDEO_INTERLACE_MODE_MIXED;
else
vinfo.interlace_mode = GST_VIDEO_INTERLACE_MODE_PROGRESSIVE;
vinfo.chroma_site = GST_VIDEO_CHROMA_SITE_MPEG2;
vinfo.colorimetry.range = GST_VIDEO_COLOR_RANGE_16_235;
@ -893,6 +895,9 @@ handle_slice (GstMpeg2dec * mpeg2dec, const mpeg2_info_t * info)
}
mpeg2dec->next_time += GST_BUFFER_DURATION (outbuf);
if (!(picture->flags & PIC_FLAG_PROGRESSIVE_FRAME))
GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_FLAG_INTERLACED);
if (picture->flags & PIC_FLAG_TOP_FIELD_FIRST)
GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF);