Fix still-frame handling.

Still frame events are not OOB downstream. Also, always send
immediately downstream.
This commit is contained in:
Jan Schmidt 2012-09-02 23:19:09 -07:00
parent 2fb27fa463
commit 52cfce851a

View file

@ -960,20 +960,21 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * decoder,
forward_immediate = TRUE; forward_immediate = TRUE;
break; break;
} }
case GST_EVENT_CUSTOM_DOWNSTREAM_OOB: case GST_EVENT_CUSTOM_DOWNSTREAM:
{ {
gboolean in_still; gboolean in_still;
GstFlowReturn flow_ret = GST_FLOW_OK; GstFlowReturn flow_ret = GST_FLOW_OK;
if (gst_video_event_parse_still_frame (event, &in_still)) { if (gst_video_event_parse_still_frame (event, &in_still)) {
if (in_still) { if (in_still) {
GST_DEBUG_OBJECT (decoder, "draining current data for still-frame");
flow_ret = gst_video_decoder_drain_out (decoder, FALSE); flow_ret = gst_video_decoder_drain_out (decoder, FALSE);
ret = (flow_ret == GST_FLOW_OK); ret = (flow_ret == GST_FLOW_OK);
forward_immediate = TRUE;
} }
forward_immediate = TRUE;
} }
break;
} }
case GST_EVENT_SEGMENT: case GST_EVENT_SEGMENT:
{ {
GstSegment segment; GstSegment segment;