splitmuxsink failed to change state when location is invalid
The following command can't exit normally when the location (/asfdasd/a_%d.mp4 in the example) is invalid. And gstreamer resource can't free properly.
gst-launch-1.0 -e v4l2src device=/dev/video0 io-mode=4 ! video/x-raw, format=YUY2, width=640,height=480,framerate=30/1 ! videoconvert ! x264enc ! h264parse ! splitmuxsink location=/asfdasd/a_%d.mp4
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
ERROR: from element /GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstFileSink:sink: Could not open file "/asfdasd/a_0.mp4" for writing.
Additional debug info:
gstfilesink.c(409): gst_file_sink_open_file (): /GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstFileSink:sink:
system error: No such file or directory
EOS on shutdown enabled -- waiting for EOS after Error
Waiting for EOS...
ERROR: from element /GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstFileSink:sink: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Additional debug info:
gstbasesink.c(5367): gst_base_sink_change_state (): /GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstFileSink:sink:
Failed to start
ERROR: from element /GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstMP4Mux:muxer: Downstream is not seekable - will not be able to create a playable file
Additional debug info:
gstqtmux.c(2975): gst_qt_mux_start_file (): /GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstMP4Mux:muxer
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason error (-5)
ERROR: from element /GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue0: Internal data stream error.
Additional debug info:
gstqueue.c(988): gst_queue_handle_sink_event (): /GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue0:
streaming stopped, reason error (-5)
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Interrupt while waiting for EOS - stopping pipeline...
Execution ended after 0:00:17.377169740
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
(gst-launch-1.0:2160699): GStreamer-CRITICAL **: 13:31:06.398:
Trying to dispose element capsfilter0, but it is in PLAYING instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.
(gst-launch-1.0:2160699): GStreamer-CRITICAL **: 13:31:06.398:
Trying to dispose element splitmuxsink0, but it is in READY instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.
(gst-launch-1.0:2160699): GStreamer-CRITICAL **: 13:31:06.398:
Trying to dispose element h264parse0, but it is in PLAYING instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.
(gst-launch-1.0:2160699): GStreamer-CRITICAL **: 13:31:06.398:
Trying to dispose element x264enc0, but it is in PLAYING instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.
(gst-launch-1.0:2160699): GStreamer-CRITICAL **: 13:31:06.405:
Trying to dispose element videoconvert0, but it is in PLAYING instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.
(gst-launch-1.0:2160699): GStreamer-CRITICAL **: 13:31:06.405:
Trying to dispose element pipeline0, but it is in PAUSED instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.
^C