mpeg2dec: drop B-frame on open gop
authorStéphane Cerveau <scerveau@collabora.com>
Wed, 28 Jul 2021 09:49:16 +0000 (11:49 +0200)
committerStéphane Cerveau <scerveau@collabora.com>
Thu, 29 Jul 2021 15:03:24 +0000 (17:03 +0200)
commitfbe2ea6e3868850388d06e66ef2681419e27f2fa
tree8da91b2a88333f7e70960a337c3f5f868c4cd3f8
parentcc1a7e2c4d10ab118d635a9db163440bc9d96dd0
mpeg2dec: drop B-frame on open gop

Enhance open gop detection to drop B-frame which are invalid
before the first reference frame.

In stream such
gst-integration-testsuites/medias/defaults/mxf/op2b-mpeg2-wave_hd.mxf,
the two first frames must be dropped as we detect an open GOP situation
but in another media, such as http://col.la/1920X1080IXDCAMEX5MIN, the
first frames should not be dropped as we are in a closed GOP situation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/merge_requests/84>
ext/mpeg2dec/gstmpeg2dec.c