codecs: h264dec: Improve the find_first_field_picture().
authorHe Junyan <junyan.he@intel.com>
Tue, 27 Jul 2021 04:51:08 +0000 (12:51 +0800)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 28 Jul 2021 10:54:21 +0000 (10:54 +0000)
commit704689ec4aae8f7d4b11fd7c325ce218b7867574
treeb8ba685cf8ddc2f0e4ecd90fbf01b79588b55ce2
parentf95aa0a3748d12fbcad45bf04eca3009ec392065
codecs: h264dec: Improve the find_first_field_picture().

We need to consider the first field of the last picture when the
last picture can not enter the DPB.

Another change is, when prev field's frame_num is not equal to the
current field's frame_num, we should also return FASLE because it
is also a case of losing some field.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2430>
gst-libs/gst/codecs/gsth264decoder.c