summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlessandro Decina <alessandro.d@gmail.com>2016-06-07 17:22:01 +1000
committerAlessandro Decina <alessandro.d@gmail.com>2016-06-07 17:22:01 +1000
commita037f132716e8bd7126cbd446be6b608185af460 (patch)
tree81ddb503a21e08021196f51b8207954d1a70e4ed /sys
parent7fea17a47645d297487c396c28c35c015189bf8c (diff)
downloadgstreamer-plugins-bad-a037f132716e8bd7126cbd446be6b608185af460.tar.gz
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.
Diffstat (limited to 'sys')
-rw-r--r--sys/applemedia/vtdec.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/applemedia/vtdec.c b/sys/applemedia/vtdec.c
index 5ebd34033..5f8882f71 100644
--- a/sys/applemedia/vtdec.c
+++ b/sys/applemedia/vtdec.c
@@ -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,