mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
vtdec: always drain in ::negotiate
Move calling gst_vtdec_push_frames_if_needed from ::set_format to ::negotiate so that we always drain even when renegotiation is triggered by downstream.
This commit is contained in:
parent
7fea17a476
commit
a037f13271
1 changed files with 3 additions and 6 deletions
|
@ -230,6 +230,8 @@ gst_vtdec_negotiate (GstVideoDecoder * decoder)
|
|||
gboolean output_textures;
|
||||
|
||||
vtdec = GST_VTDEC (decoder);
|
||||
if (vtdec->session)
|
||||
gst_vtdec_push_frames_if_needed (vtdec, TRUE, FALSE);
|
||||
templcaps =
|
||||
gst_pad_get_pad_template_caps (GST_VIDEO_DECODER_SRC_PAD (decoder));
|
||||
peercaps = gst_pad_peer_query_caps (GST_VIDEO_DECODER_SRC_PAD (vtdec), NULL);
|
||||
|
@ -279,10 +281,8 @@ gst_vtdec_negotiate (GstVideoDecoder * decoder)
|
|||
"negotiated output format %" GST_PTR_FORMAT " previous %"
|
||||
GST_PTR_FORMAT, output_state->caps, prevcaps);
|
||||
|
||||
if (vtdec->session) {
|
||||
gst_vtdec_push_frames_if_needed (vtdec, TRUE, FALSE);
|
||||
if (vtdec->session)
|
||||
gst_vtdec_invalidate_session (vtdec);
|
||||
}
|
||||
|
||||
err = gst_vtdec_create_session (vtdec, format, TRUE);
|
||||
if (err == noErr) {
|
||||
|
@ -357,9 +357,6 @@ gst_vtdec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if (vtdec->session)
|
||||
gst_vtdec_push_frames_if_needed (vtdec, TRUE, FALSE);
|
||||
|
||||
gst_video_info_from_caps (&vtdec->video_info, state->caps);
|
||||
|
||||
if (!gst_vtdec_compute_reorder_queue_length (vtdec, cm_format,
|
||||
|
|
Loading…
Reference in a new issue