msdkdec: add parse callback for non-packetized input
authorHaihao Xiang <haihao.xiang@intel.com>
Fri, 27 Sep 2019 02:50:18 +0000 (10:50 +0800)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tue, 29 Oct 2019 14:58:54 +0000 (14:58 +0000)
commitcd883427e93d9a38541fee3a89498abf9a92e423
treea66ae633b7cad929da7dae190c76f07049966780
parentd8372736c6ca1c31f3622888eaa506fb01be626e
msdkdec: add parse callback for non-packetized input

commit 55c0d720 added the capability to handle non-packetized bitstream,
and there is a loop to handle multiple frames in a non-packetized buffer
in gst_msdkdec_handle_frame. However it is possible that a
non-packetized buffer still contains valid data but there is no long any
pending unfinished frame. Currently gst_video_decoder_decode_frame is
invoked to send a new frame with new input data, the situaltion is
repeated till an EOS is received. An application has to exit when
receiving an EOS, however there is still valid data in a
non-packetezied input buffer, hence some frames are dropped.

This fix adds a parse callback for non-packeteized input, a new frame
will be sent to the subclass as soon as the input buffer has valid data

This fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/665
sys/msdk/gstmsdkdec.c
sys/msdk/gstmsdkvc1dec.c