mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 23:14:46 +00:00
videodecoder: In reverse playback mode we need to finish the subclass after passing all frames to it
This commit is contained in:
parent
8d439edd7a
commit
1c26e5734c
1 changed files with 17 additions and 5 deletions
|
@ -960,16 +960,16 @@ gst_video_decoder_drain_out (GstVideoDecoder * dec, gboolean at_eos)
|
|||
if (!priv->packetized) {
|
||||
ret = gst_video_decoder_parse_available (dec, TRUE, FALSE);
|
||||
}
|
||||
|
||||
if (at_eos) {
|
||||
if (decoder_class->finish)
|
||||
ret = decoder_class->finish (dec);
|
||||
}
|
||||
} else {
|
||||
/* Reverse playback mode */
|
||||
ret = gst_video_decoder_flush_parse (dec, TRUE);
|
||||
}
|
||||
|
||||
if (at_eos) {
|
||||
if (decoder_class->finish)
|
||||
ret = decoder_class->finish (dec);
|
||||
}
|
||||
|
||||
GST_VIDEO_DECODER_STREAM_UNLOCK (dec);
|
||||
|
||||
return ret;
|
||||
|
@ -1986,6 +1986,18 @@ gst_video_decoder_flush_parse (GstVideoDecoder * dec, gboolean at_eos)
|
|||
walk = priv->parse_gather;
|
||||
}
|
||||
|
||||
/* We need to tell the subclass to drain now */
|
||||
if (at_eos) {
|
||||
GstVideoDecoderClass *decoder_class;
|
||||
|
||||
decoder_class = GST_VIDEO_DECODER_GET_CLASS (dec);
|
||||
if (decoder_class->finish)
|
||||
res = decoder_class->finish (dec);
|
||||
}
|
||||
|
||||
if (res != GST_FLOW_OK)
|
||||
goto done;
|
||||
|
||||
/* now send queued data downstream */
|
||||
walk = priv->output_queued;
|
||||
while (walk) {
|
||||
|
|
Loading…
Reference in a new issue