If the pad is flushing after a failed negotiation, return
GST_FLOW_FLUSHING instead from finish_frame().
https://bugzilla.gnome.org/show_bug.cgi?id=701763
GST_VIDEO_DECODER_STREAM_LOCK (decoder);
if (G_UNLIKELY (priv->output_state_changed || (priv->output_state
- && gst_pad_check_reconfigure (decoder->srcpad))))
- gst_video_decoder_negotiate (decoder);
+ && gst_pad_check_reconfigure (decoder->srcpad)))) {
+ if (!gst_video_decoder_negotiate (decoder)) {
+ if (GST_PAD_IS_FLUSHING (decoder->srcpad))
+ ret = GST_FLOW_FLUSHING;
+ else
+ ret = GST_FLOW_NOT_NEGOTIATED;
+ goto done;
+ }
+ }
gst_video_decoder_prepare_finish_frame (decoder, frame, FALSE);
priv->processed++;
GST_VIDEO_ENCODER_STREAM_LOCK (encoder);
if (G_UNLIKELY (priv->output_state_changed || (priv->output_state
- && gst_pad_check_reconfigure (encoder->srcpad))))
- gst_video_encoder_negotiate (encoder);
+ && gst_pad_check_reconfigure (encoder->srcpad)))) {
+ if (!gst_video_encoder_negotiate (encoder)) {
+ if (GST_PAD_IS_FLUSHING (encoder->srcpad))
+ ret = GST_FLOW_FLUSHING;
+ else
+ ret = GST_FLOW_NOT_NEGOTIATED;
+ goto done;
+ }
+ }
if (G_UNLIKELY (priv->output_state == NULL))
goto no_output_state;