Revert "vaapidecode: drop non-keyframe in reverse playback"

Since the number of surfaces are not bounded to decoder context,
this hack is no longer needed.

This reverts commit 19c0c8a973.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/353>
This commit is contained in:
Víctor Manuel Jáquez Leal 2020-07-08 17:48:57 +02:00
parent ac3e8c7c40
commit a4c4314be6
2 changed files with 0 additions and 31 deletions

View file

@ -613,14 +613,6 @@ gst_vaapidecode_push_decoded_frame (GstVideoDecoder * vdec,
}
}
if (decode->in_segment.rate < 0.0
&& !GST_VAAPI_PLUGIN_BASE_COPY_OUTPUT_FRAME (vdec)
&& !GST_VIDEO_CODEC_FRAME_IS_SYNC_POINT (out_frame)) {
GST_TRACE_OBJECT (decode, "drop frame in reverse playback");
gst_video_decoder_release_frame (GST_VIDEO_DECODER (decode), out_frame);
return GST_FLOW_OK;
}
ret = gst_video_decoder_finish_frame (vdec, out_frame);
if (ret != GST_FLOW_OK)
goto error_commit_buffer;
@ -1445,27 +1437,6 @@ gst_vaapidecode_src_query (GstVideoDecoder * vdec, GstQuery * query)
return ret;
}
static gboolean
gst_vaapidecode_sink_event (GstVideoDecoder * vdec, GstEvent * event)
{
GstVaapiDecode *const decode = GST_VAAPIDECODE (vdec);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEGMENT:
{
/* Keep segment event to refer to rate so that
* vaapidecode can handle reverse playback
*/
gst_event_copy_segment (event, &decode->in_segment);
break;
}
default:
break;
}
return GST_VIDEO_DECODER_CLASS (parent_class)->sink_event (vdec, event);
}
static gboolean
gst_vaapidecode_transform_meta (GstVideoDecoder *
vdec, GstVideoCodecFrame * frame, GstMeta * meta)
@ -1517,7 +1488,6 @@ gst_vaapidecode_class_init (GstVaapiDecodeClass * klass)
vdec_class->src_query = GST_DEBUG_FUNCPTR (gst_vaapidecode_src_query);
vdec_class->sink_query = GST_DEBUG_FUNCPTR (gst_vaapidecode_sink_query);
vdec_class->getcaps = GST_DEBUG_FUNCPTR (gst_vaapidecode_sink_getcaps);
vdec_class->sink_event = GST_DEBUG_FUNCPTR (gst_vaapidecode_sink_event);
vdec_class->transform_meta =
GST_DEBUG_FUNCPTR (gst_vaapidecode_transform_meta);

View file

@ -54,7 +54,6 @@ struct _GstVaapiDecode {
guint display_height;
GstVideoCodecState *input_state;
GstSegment in_segment;
gboolean do_renego;
};