h264/h265parse: Fix handling of very last frame
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 22 Apr 2020 21:53:39 +0000 (17:53 -0400)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 23 Apr 2020 12:28:54 +0000 (12:28 +0000)
commit0d637c14c5233ebbba7d11b988b69e935f00e82f
treef5d26b167486cc40de06b9541abcc07146e3d846
parent15365aba70cc869de4808dbf8cfff5aa15dc8214
h264/h265parse: Fix handling of very last frame

Baseparse will never call us back on draining, so going into more: label will
cause the current frame to be discarded. So if we have a complete NAL, but not
a complete AU, make sure to terminate the frame properly.

This is a gression introduce by commit e88d8480709581a2e54b7954c47193b729b23c79 and
a194a87b2600a21f1b47b8c89b1c930d5f30de42.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1275

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1208>
gst/videoparsers/gsth264parse.c
gst/videoparsers/gsth265parse.c