diff --git a/ext/assrender/gstassrender.c b/ext/assrender/gstassrender.c index e4840c6b70..e7b5e14cab 100644 --- a/ext/assrender/gstassrender.c +++ b/ext/assrender/gstassrender.c @@ -1053,7 +1053,7 @@ gst_ass_render_chain_text (GstPad * pad, GstObject * parent, GstBuffer * buffer) if (render->subtitle_flushing) { gst_buffer_unref (buffer); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } timestamp = GST_BUFFER_TIMESTAMP (buffer); @@ -1106,7 +1106,7 @@ gst_ass_render_chain_text (GstPad * pad, GstObject * parent, GstBuffer * buffer) GST_DEBUG_OBJECT (render, "Text pad flushing"); gst_buffer_unref (buffer); g_mutex_unlock (&render->subtitle_mutex); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } GST_DEBUG_OBJECT (render, "Too early text buffer, waiting (%" GST_TIME_FORMAT " > %" diff --git a/ext/bz2/gstbz2dec.c b/ext/bz2/gstbz2dec.c index ac53f6095e..1ceeb64870 100644 --- a/ext/bz2/gstbz2dec.c +++ b/ext/bz2/gstbz2dec.c @@ -185,7 +185,7 @@ decode_failed: not_ready: { GST_ELEMENT_ERROR (b, LIBRARY, FAILED, (NULL), ("Decompressor not ready.")); - flow = GST_FLOW_WRONG_STATE; + flow = GST_FLOW_FLUSHING; goto done; } } diff --git a/ext/bz2/gstbz2enc.c b/ext/bz2/gstbz2enc.c index 83a6b2e090..8681904d8d 100644 --- a/ext/bz2/gstbz2enc.c +++ b/ext/bz2/gstbz2enc.c @@ -225,7 +225,7 @@ done: not_ready: { GST_ELEMENT_ERROR (b, LIBRARY, FAILED, (NULL), ("Compressor not ready.")); - flow = GST_FLOW_WRONG_STATE; + flow = GST_FLOW_FLUSHING; goto done; } compress_error: diff --git a/ext/cog/gstcogmse.c b/ext/cog/gstcogmse.c index ad38d8dfb0..f4ac3fb58f 100644 --- a/ext/cog/gstcogmse.c +++ b/ext/cog/gstcogmse.c @@ -338,7 +338,7 @@ gst_mse_chain_ref (GstPad * pad, GstBuffer * buffer) if (fs->cancel) { g_mutex_unlock (fs->lock); gst_object_unref (fs); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } } @@ -370,7 +370,7 @@ gst_mse_chain_test (GstPad * pad, GstBuffer * buffer) if (fs->cancel) { g_mutex_unlock (fs->lock); gst_object_unref (fs); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } } diff --git a/ext/kate/gstkatetiger.c b/ext/kate/gstkatetiger.c index 1504e112b5..67783dcfa5 100644 --- a/ext/kate/gstkatetiger.c +++ b/ext/kate/gstkatetiger.c @@ -824,7 +824,7 @@ gst_kate_tiger_video_chain (GstPad * pad, GstBuffer * buf) GST_KATE_TIGER_MUTEX_UNLOCK (tiger); gst_object_unref (tiger); gst_buffer_unref (buf); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } if (G_LIKELY (GST_BUFFER_TIMESTAMP_IS_VALID (buf))) { diff --git a/ext/mpeg2enc/gstmpeg2enc.cc b/ext/mpeg2enc/gstmpeg2enc.cc index 9249f4d892..e8f16aa215 100644 --- a/ext/mpeg2enc/gstmpeg2enc.cc +++ b/ext/mpeg2enc/gstmpeg2enc.cc @@ -646,7 +646,7 @@ gst_mpeg2enc_src_activate_mode (GstPad * pad, GstObject * parent, /* can only end the encoding loop by forcing eos */ GST_MPEG2ENC_MUTEX_LOCK (enc); enc->eos = TRUE; - enc->srcresult = GST_FLOW_WRONG_STATE; + enc->srcresult = GST_FLOW_FLUSHING; GST_MPEG2ENC_SIGNAL (enc); GST_MPEG2ENC_MUTEX_UNLOCK (enc); diff --git a/ext/mplex/gstmplex.cc b/ext/mplex/gstmplex.cc index ebf1a15a16..4a492976b0 100644 --- a/ext/mplex/gstmplex.cc +++ b/ext/mplex/gstmplex.cc @@ -465,7 +465,7 @@ gst_mplex_sink_event (GstPad * sinkpad, GstObject * parent, GstEvent * event) /* now unblock the chain function */ GST_MPLEX_MUTEX_LOCK (mplex); - mplex->srcresult = GST_FLOW_WRONG_STATE; + mplex->srcresult = GST_FLOW_FLUSHING; GST_MPLEX_SIGNAL (mplex, mpad); GST_MPLEX_MUTEX_UNLOCK (mplex); /* no way to pause/restart loop task */ @@ -709,7 +709,7 @@ gst_mplex_src_activate_mode (GstPad * pad, GstObject * parent, /* end the muxing loop by forcing eos and unblock chains */ GST_MPLEX_MUTEX_LOCK (mplex); mplex->eos = TRUE; - mplex->srcresult = GST_FLOW_WRONG_STATE; + mplex->srcresult = GST_FLOW_FLUSHING; GST_MPLEX_SIGNAL_ALL (mplex); GST_MPLEX_MUTEX_UNLOCK (mplex); diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index e3eba9f915..21282a6203 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -1159,7 +1159,7 @@ internal_error: branching: { g_mutex_unlock (src->branch_lock); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } } diff --git a/ext/teletextdec/gstteletextdec.c b/ext/teletextdec/gstteletextdec.c index 846c243e41..e61cba9b1e 100644 --- a/ext/teletextdec/gstteletextdec.c +++ b/ext/teletextdec/gstteletextdec.c @@ -739,7 +739,7 @@ gst_teletextdec_chain (GstPad * pad, GstBuffer * buf) error: { if (ret != GST_FLOW_OK && ret != GST_FLOW_NOT_LINKED - && ret != GST_FLOW_WRONG_STATE) { + && ret != GST_FLOW_FLUSHING) { GST_ELEMENT_ERROR (teletext, STREAM, FAILED, ("Internal data stream error."), ("stream stopped, reason %s", gst_flow_get_name (ret))); diff --git a/gst/audiobuffer/gstaudioringbuffer.c b/gst/audiobuffer/gstaudioringbuffer.c index e3bc47a562..d46d2d8963 100644 --- a/gst/audiobuffer/gstaudioringbuffer.c +++ b/gst/audiobuffer/gstaudioringbuffer.c @@ -778,7 +778,7 @@ flushing: { GST_DEBUG_OBJECT (ringbuffer, "ringbuffer is flushing"); GST_OBJECT_UNLOCK (ringbuffer); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } } @@ -944,7 +944,7 @@ flushing: GST_DEBUG_OBJECT (ringbuffer, "we are flushing"); GST_OBJECT_UNLOCK (ringbuffer); gst_object_unref (ringbuffer); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } wrong_size: { diff --git a/gst/camerabin/gstinputselector.c b/gst/camerabin/gstinputselector.c index 8fe8c0f027..750d6ce87a 100644 --- a/gst/camerabin/gstinputselector.c +++ b/gst/camerabin/gstinputselector.c @@ -675,7 +675,7 @@ flushing: GST_DEBUG_OBJECT (pad, "We are flushing, discard buffer %p", buf); GST_INPUT_SELECTOR_UNLOCK (sel); gst_buffer_unref (buf); - res = GST_FLOW_WRONG_STATE; + res = GST_FLOW_FLUSHING; goto done; } } diff --git a/gst/dtmf/gstdtmfsrc.c b/gst/dtmf/gstdtmfsrc.c index c7b4945ede..9e3ea47a10 100644 --- a/gst/dtmf/gstdtmfsrc.c +++ b/gst/dtmf/gstdtmfsrc.c @@ -798,7 +798,7 @@ paused: dtmfsrc->last_event = NULL; } - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } diff --git a/gst/dtmf/gstrtpdtmfsrc.c b/gst/dtmf/gstrtpdtmfsrc.c index f97261ef6f..6e6140af76 100644 --- a/gst/dtmf/gstrtpdtmfsrc.c +++ b/gst/dtmf/gstrtpdtmfsrc.c @@ -844,7 +844,7 @@ paused: dtmfsrc->redundancy_count = dtmfsrc->packet_redundancy; goto send_last; } else { - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } no_clock: diff --git a/gst/freeze/gstfreeze.c b/gst/freeze/gstfreeze.c index 0d63eb70a6..1ead319702 100644 --- a/gst/freeze/gstfreeze.c +++ b/gst/freeze/gstfreeze.c @@ -239,7 +239,7 @@ gst_freeze_play (GstPad * pad, GstBuffer * buff) if (freeze->on_flush) { g_object_unref (freeze); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } /* If it is working in push mode this function will be called by "_chain" diff --git a/gst/liveadder/liveadder.c b/gst/liveadder/liveadder.c index ec232a709f..fc3154ce93 100644 --- a/gst/liveadder/liveadder.c +++ b/gst/liveadder/liveadder.c @@ -425,7 +425,7 @@ gst_live_adder_flush_start (GstLiveAdder * adder) GST_OBJECT_LOCK (adder); /* mark ourselves as flushing */ - adder->srcresult = GST_FLOW_WRONG_STATE; + adder->srcresult = GST_FLOW_FLUSHING; /* Empty the queue */ g_queue_foreach (adder->buffers, (GFunc) gst_mini_object_unref, NULL); diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c index a76f11db2b..4bf6235460 100644 --- a/gst/mpegdemux/gstmpegdemux.c +++ b/gst/mpegdemux/gstmpegdemux.c @@ -2738,7 +2738,7 @@ gst_flups_demux_loop (GstPad * pad) demux = GST_FLUPS_DEMUX (gst_pad_get_parent (pad)); if (G_UNLIKELY (demux->flushing)) { - ret = GST_FLOW_WRONG_STATE; + ret = GST_FLOW_FLUSHING; goto pause; } @@ -3013,7 +3013,7 @@ gst_flups_demux_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) while (gst_flups_demux_resync (demux, save)) { gboolean ps_sync = TRUE; if (G_UNLIKELY (demux->flushing)) { - ret = GST_FLOW_WRONG_STATE; + ret = GST_FLOW_FLUSHING; goto done; } diff --git a/gst/multifdsink/gstmultifdsink.c b/gst/multifdsink/gstmultifdsink.c index ca179210c9..0cebea7868 100644 --- a/gst/multifdsink/gstmultifdsink.c +++ b/gst/multifdsink/gstmultifdsink.c @@ -2481,7 +2481,7 @@ gst_multi_fd_sink_render (GstBaseSink * bsink, GstBuffer * buf) sink = GST_MULTI_FD_SINK (bsink); g_return_val_if_fail (GST_OBJECT_FLAG_IS_SET (sink, GST_MULTI_FD_SINK_OPEN), - GST_FLOW_WRONG_STATE); + GST_FLOW_FLUSHING); #if 0 /* since we check every buffer for streamheader caps, we need to make diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index 496ee38f7e..47042103d1 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -611,11 +611,11 @@ gst_mxf_demux_choose_package (GstMXFDemux * demux) for (i = 0; i < demux->preface->content_storage->n_packages; i++) { if (demux->preface->content_storage->packages[i] && - MXF_IS_METADATA_MATERIAL_PACKAGE (demux->preface-> - content_storage->packages[i])) { + MXF_IS_METADATA_MATERIAL_PACKAGE (demux->preface->content_storage-> + packages[i])) { ret = - MXF_METADATA_GENERIC_PACKAGE (demux->preface-> - content_storage->packages[i]); + MXF_METADATA_GENERIC_PACKAGE (demux->preface->content_storage-> + packages[i]); break; } } @@ -775,8 +775,8 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux) essence_container); if (track->parent.type == MXF_METADATA_TRACK_PICTURE_ESSENCE) { - if (MXF_IS_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (track-> - parent.descriptor[0])) + if (MXF_IS_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (track->parent. + descriptor[0])) mxf_ul_to_string (&MXF_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (track->parent.descriptor[0])->picture_essence_coding, essence_compression); @@ -785,8 +785,8 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux) g_strdup_printf ("video/x-mxf-%s-%s", essence_container, essence_compression); } else if (track->parent.type == MXF_METADATA_TRACK_SOUND_ESSENCE) { - if (MXF_IS_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track-> - parent.descriptor[0])) + if (MXF_IS_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track->parent. + descriptor[0])) mxf_ul_to_string (&MXF_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track->parent.descriptor[0])->sound_essence_compression, essence_compression); @@ -795,8 +795,8 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux) g_strdup_printf ("audio/x-mxf-%s-%s", essence_container, essence_compression); } else if (track->parent.type == MXF_METADATA_TRACK_DATA_ESSENCE) { - if (MXF_IS_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR (track-> - parent.descriptor[0])) + if (MXF_IS_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR (track->parent. + descriptor[0])) mxf_ul_to_string (&MXF_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR (track->parent.descriptor[0])->data_essence_coding, essence_compression); @@ -1421,8 +1421,8 @@ gst_mxf_demux_pad_set_component (GstMXFDemux * demux, GstMXFDemuxPad * pad, pad->current_component_index); pad->current_component = - MXF_METADATA_SOURCE_CLIP (sequence-> - structural_components[pad->current_component_index]); + MXF_METADATA_SOURCE_CLIP (sequence->structural_components[pad-> + current_component_index]); if (pad->current_component == NULL) { GST_ERROR_OBJECT (demux, "No such structural component"); return GST_FLOW_ERROR; @@ -1430,8 +1430,8 @@ gst_mxf_demux_pad_set_component (GstMXFDemux * demux, GstMXFDemuxPad * pad, if (!pad->current_component->source_package || !pad->current_component->source_package->top_level - || !MXF_METADATA_GENERIC_PACKAGE (pad-> - current_component->source_package)->tracks) { + || !MXF_METADATA_GENERIC_PACKAGE (pad->current_component-> + source_package)->tracks) { GST_ERROR_OBJECT (demux, "Invalid component"); return GST_FLOW_ERROR; } @@ -2849,7 +2849,7 @@ gst_mxf_demux_chain (GstPad * pad, GstBuffer * inbuf) while (ret == GST_FLOW_OK) { if (G_UNLIKELY (demux->flushing)) { GST_DEBUG_OBJECT (demux, "we are now flushing, exiting parser loop"); - ret = GST_FLOW_WRONG_STATE; + ret = GST_FLOW_FLUSHING; break; } @@ -2998,8 +2998,8 @@ gst_mxf_demux_pad_set_last_stop (GstMXFDemux * demux, GstMXFDemuxPad * p, for (i = 0; i < p->material_track->parent.sequence->n_structural_components; i++) { clip = - MXF_METADATA_SOURCE_CLIP (p->material_track->parent. - sequence->structural_components[i]); + MXF_METADATA_SOURCE_CLIP (p->material_track->parent.sequence-> + structural_components[i]); if (clip->parent.duration <= 0) break; @@ -3077,8 +3077,8 @@ gst_mxf_demux_seek_push (GstMXFDemux * demux, GstEvent * event) if (format != GST_FORMAT_TIME) goto wrong_format; - flush = !!(flags & GST_SEEK_FLAG_FLUSH); - keyframe = !!(flags & GST_SEEK_FLAG_KEY_UNIT); + flush = ! !(flags & GST_SEEK_FLAG_FLUSH); + keyframe = ! !(flags & GST_SEEK_FLAG_KEY_UNIT); /* Work on a copy until we are sure the seek succeeded. */ memcpy (&seeksegment, &demux->segment, sizeof (GstSegment)); @@ -3210,8 +3210,8 @@ gst_mxf_demux_seek_pull (GstMXFDemux * demux, GstEvent * event) if (rate <= 0.0) goto wrong_rate; - flush = !!(flags & GST_SEEK_FLAG_FLUSH); - keyframe = !!(flags & GST_SEEK_FLAG_KEY_UNIT); + flush = ! !(flags & GST_SEEK_FLAG_FLUSH); + keyframe = ! !(flags & GST_SEEK_FLAG_KEY_UNIT); if (flush) { GstEvent *e; diff --git a/gst/nuvdemux/gstnuvdemux.c b/gst/nuvdemux/gstnuvdemux.c index 22efb9402e..7569eb30bd 100644 --- a/gst/nuvdemux/gstnuvdemux.c +++ b/gst/nuvdemux/gstnuvdemux.c @@ -773,7 +773,7 @@ gst_nuv_demux_read_bytes (GstNuvDemux * nuv, guint64 size, gboolean move, /* got eos */ } else if (ret == GST_FLOW_UNEXPECTED) { gst_nuv_demux_send_eos (nuv); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } } else { if (gst_adapter_available (nuv->adapter) < size) diff --git a/gst/tta/gstttaparse.c b/gst/tta/gstttaparse.c index 069408ab60..e7c131ba9a 100644 --- a/gst/tta/gstttaparse.c +++ b/gst/tta/gstttaparse.c @@ -432,7 +432,7 @@ found_eos: { GST_DEBUG ("found EOS"); gst_pad_push_event (ttaparse->srcpad, gst_event_new_eos ()); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } pull_error: { diff --git a/sys/applemedia/avfvideosrc.m b/sys/applemedia/avfvideosrc.m index 37ff576f59..e6fb496132 100644 --- a/sys/applemedia/avfvideosrc.m +++ b/sys/applemedia/avfvideosrc.m @@ -421,7 +421,7 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer [bufQueueLock lockWhenCondition:HAS_BUFFER_OR_STOP_REQUEST]; if (stopRequest) { [bufQueueLock unlock]; - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } sbuf = (CMSampleBufferRef) [bufQueue lastObject]; diff --git a/sys/applemedia/celvideosrc.c b/sys/applemedia/celvideosrc.c index 6ea15e88fd..60f9c1974c 100644 --- a/sys/applemedia/celvideosrc.c +++ b/sys/applemedia/celvideosrc.c @@ -470,7 +470,7 @@ gst_cel_video_src_create (GstPushSrc * pushsrc, GstBuffer ** buf) shutting_down: { cm->FigSampleBufferRelease (sbuf); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } } diff --git a/sys/applemedia/miovideosrc.c b/sys/applemedia/miovideosrc.c index 7b0e428c49..f505b2c80f 100644 --- a/sys/applemedia/miovideosrc.c +++ b/sys/applemedia/miovideosrc.c @@ -441,7 +441,7 @@ shutting_down: *buf = NULL; } - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } unexpected_format: { diff --git a/sys/applemedia/qtkitvideosrc.m b/sys/applemedia/qtkitvideosrc.m index c228692ddb..fb9dcc338d 100644 --- a/sys/applemedia/qtkitvideosrc.m +++ b/sys/applemedia/qtkitvideosrc.m @@ -434,7 +434,7 @@ openFailed: [queueLock lockWhenCondition:HAS_FRAME_OR_STOP_REQUEST]; if (stopRequest) { [queueLock unlock]; - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } frame = (CVPixelBufferRef) [queue lastObject]; diff --git a/sys/avc/gstavcsrc.cpp b/sys/avc/gstavcsrc.cpp index c63c9853ad..d9c07bdd57 100644 --- a/sys/avc/gstavcsrc.cpp +++ b/sys/avc/gstavcsrc.cpp @@ -391,7 +391,7 @@ gst_avc_src_create (GstBaseSrc * src, guint64 offset, guint size, if (avcsrc->unlock) { if (buffer) gst_buffer_unref (buffer); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } gst_buffer_set_caps (buffer, GST_PAD_CAPS (avcsrc->srcpad)); diff --git a/sys/d3dvideosink/d3dvideosink.c b/sys/d3dvideosink/d3dvideosink.c index 9ca6b960e2..6c757b4b9e 100644 --- a/sys/d3dvideosink/d3dvideosink.c +++ b/sys/d3dvideosink/d3dvideosink.c @@ -1710,7 +1710,7 @@ success: GST_D3DVIDEOSINK_SHARED_D3D_DEV_UNLOCK return GST_FLOW_OK; wrong_state: GST_D3DVIDEOSINK_SWAP_CHAIN_UNLOCK (sink); - GST_D3DVIDEOSINK_SHARED_D3D_DEV_UNLOCK return GST_FLOW_WRONG_STATE; + GST_D3DVIDEOSINK_SHARED_D3D_DEV_UNLOCK return GST_FLOW_FLUSHING; /*unexpected:*/ /* GST_D3DVIDEOSINK_SWAP_CHAIN_UNLOCK(sink); */ /* GST_D3DVIDEOSINK_SHARED_D3D_DEV_UNLOCK */ diff --git a/sys/decklink/gstdecklinksink.cpp b/sys/decklink/gstdecklinksink.cpp index 9224197749..8ccb880545 100644 --- a/sys/decklink/gstdecklinksink.cpp +++ b/sys/decklink/gstdecklinksink.cpp @@ -741,7 +741,7 @@ gst_decklink_sink_videosink_chain (GstPad * pad, GstBuffer * buffer) ret = GST_FLOW_OK; } else { - ret = GST_FLOW_WRONG_STATE; + ret = GST_FLOW_FLUSHING; } frame->Release (); diff --git a/sys/dshowdecwrapper/gstdshowaudiodec.cpp b/sys/dshowdecwrapper/gstdshowaudiodec.cpp index f10ac8cdc8..884b8050d7 100644 --- a/sys/dshowdecwrapper/gstdshowaudiodec.cpp +++ b/sys/dshowdecwrapper/gstdshowaudiodec.cpp @@ -579,7 +579,7 @@ gst_dshowaudiodec_chain (GstPad * pad, GstBuffer * buffer) if (!adec->setup) { /* we are not set up */ GST_WARNING_OBJECT (adec, "Decoder not set up, failing"); - adec->last_ret = GST_FLOW_WRONG_STATE; + adec->last_ret = GST_FLOW_FLUSHING; goto beach; } diff --git a/sys/dshowdecwrapper/gstdshowvideodec.cpp b/sys/dshowdecwrapper/gstdshowvideodec.cpp index 663e980437..370f5192b9 100644 --- a/sys/dshowdecwrapper/gstdshowvideodec.cpp +++ b/sys/dshowdecwrapper/gstdshowvideodec.cpp @@ -853,7 +853,7 @@ gst_dshowvideodec_chain (GstPad * pad, GstBuffer * buffer) if (!vdec->setup) { /* we are not setup */ GST_WARNING_OBJECT (vdec, "Decoder not set up, failing"); - vdec->last_ret = GST_FLOW_WRONG_STATE; + vdec->last_ret = GST_FLOW_FLUSHING; goto beach; } diff --git a/sys/dshowsrcwrapper/gstdshowvideosrc.cpp b/sys/dshowsrcwrapper/gstdshowvideosrc.cpp index e84148ab4c..35d01ba0fb 100644 --- a/sys/dshowsrcwrapper/gstdshowvideosrc.cpp +++ b/sys/dshowsrcwrapper/gstdshowvideosrc.cpp @@ -868,7 +868,7 @@ gst_dshowvideosrc_create (GstPushSrc * psrc, GstBuffer ** buf) gst_buffer_unref (*buf); *buf = NULL; } - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } GST_DEBUG ("dshowvideosrc_create => pts %" GST_TIME_FORMAT " duration %" diff --git a/sys/dshowvideosink/dshowvideosink.cpp b/sys/dshowvideosink/dshowvideosink.cpp index 8b8554ca63..b1af014fd8 100644 --- a/sys/dshowvideosink/dshowvideosink.cpp +++ b/sys/dshowvideosink/dshowvideosink.cpp @@ -1675,13 +1675,13 @@ gst_dshowvideosink_show_frame (GstVideoSink *vsink, GstBuffer *buffer) if (!sink->graph_running){ retst = gst_dshowvideosink_start_graph(sink); if (retst == GST_STATE_CHANGE_FAILURE) - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } ret = sink->fakesrc->GetOutputPin()->PushBuffer (buffer); if (!sink->graph_running){ retst = gst_dshowvideosink_pause_graph(sink); if (retst == GST_STATE_CHANGE_FAILURE) - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } GST_DSHOWVIDEOSINK_GRAPH_UNLOCK(sink); GST_DEBUG_OBJECT (sink, "Done pushing buffer through fakesrc->renderer: %s", gst_flow_get_name(ret)); diff --git a/sys/linsys/gstlinsyssdisrc.c b/sys/linsys/gstlinsyssdisrc.c index f3cd72a403..11384c8b33 100644 --- a/sys/linsys/gstlinsyssdisrc.c +++ b/sys/linsys/gstlinsyssdisrc.c @@ -415,7 +415,7 @@ gst_linsys_sdi_src_create (GstBaseSrc * src, guint64 _offset, guint size, guint8 *data = linsyssdisrc->tmpdata; if (linsyssdisrc->fd < 0) - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; if (linsyssdisrc->is_625) { sdi_width = 864; diff --git a/sys/shm/gstshmsink.c b/sys/shm/gstshmsink.c index cb6c92bfa6..64490cf921 100644 --- a/sys/shm/gstshmsink.c +++ b/sys/shm/gstshmsink.c @@ -404,7 +404,7 @@ gst_shm_sink_render (GstBaseSink * bsink, GstBuffer * buf) g_cond_wait (self->cond, GST_OBJECT_GET_LOCK (self)); if (self->unlock) { GST_OBJECT_UNLOCK (self); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } } @@ -412,7 +412,7 @@ gst_shm_sink_render (GstBaseSink * bsink, GstBuffer * buf) g_cond_wait (self->cond, GST_OBJECT_GET_LOCK (self)); if (self->unlock) { GST_OBJECT_UNLOCK (self); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } } @@ -427,7 +427,7 @@ gst_shm_sink_render (GstBaseSink * bsink, GstBuffer * buf) g_cond_wait (self->cond, GST_OBJECT_GET_LOCK (self)); if (self->unlock) { GST_OBJECT_UNLOCK (self); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } } while (self->wait_for_connection && !self->clients) { @@ -435,7 +435,7 @@ gst_shm_sink_render (GstBaseSink * bsink, GstBuffer * buf) if (self->unlock) { sp_writer_free_block (block); GST_OBJECT_UNLOCK (self); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } } diff --git a/sys/shm/gstshmsrc.c b/sys/shm/gstshmsrc.c index bbeadcd7d0..7e6b20178c 100644 --- a/sys/shm/gstshmsrc.c +++ b/sys/shm/gstshmsrc.c @@ -306,14 +306,14 @@ gst_shm_src_create (GstPushSrc * psrc, GstBuffer ** outbuf) do { if (gst_poll_wait (self->poll, GST_CLOCK_TIME_NONE) < 0) { if (errno == EBUSY) - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; GST_ELEMENT_ERROR (self, RESOURCE, READ, ("Failed to read from shmsrc"), ("Poll failed on fd: %s", strerror (errno))); return GST_FLOW_ERROR; } if (self->unlocked) - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; if (gst_poll_fd_has_closed (self->poll, &self->pollfd)) { GST_ELEMENT_ERROR (self, RESOURCE, READ, ("Failed to read from shmsrc"), diff --git a/sys/winks/gstksvideodevice.c b/sys/winks/gstksvideodevice.c index dbd7f035b3..957b874e9f 100644 --- a/sys/winks/gstksvideodevice.c +++ b/sys/winks/gstksvideodevice.c @@ -1146,7 +1146,7 @@ error_cancel: if (error_str != NULL) *error_str = NULL; - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } error_get_result: {