From bc8af2cca5bc1465c4837ef6ebfc394ad7f9b9a2 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Sat, 26 Jan 2019 10:35:31 -0300 Subject: [PATCH] flvdemux: Do not error out if the first added and chained pad is not linked And let it the oportunity to get its other pad linked Example: ``` $ gst-launch-1.0 uridecodebin uri=file:///home/thiblahute/gst-validate.save/gst-integration-testsuites/testsuites/../medias/defaults/flv/819290236.flv caps=audio/x-raw expose-all-streams=FALSE ! fakesink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstFlvDemux:flvdemux0: Internal data stream error. Additional debug info: ../subprojects/gst-plugins-good/gst/flv/gstflvdemux.c(2760): gst_flv_demux_loop (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstFlvDemux:flvdemux0: streaming stopped, reason not-linked (-1) ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... Freeing pipeline ... ``` --- gst/flv/gstflvdemux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/flv/gstflvdemux.c b/gst/flv/gstflvdemux.c index cffbd58e41..cf3b53ad52 100644 --- a/gst/flv/gstflvdemux.c +++ b/gst/flv/gstflvdemux.c @@ -2687,7 +2687,8 @@ gst_flv_demux_loop (GstPad * pad) } /* pause if something went wrong or at end */ - if (G_UNLIKELY (ret != GST_FLOW_OK)) + if (G_UNLIKELY (ret != GST_FLOW_OK) && !(ret == GST_FLOW_NOT_LINKED + && !demux->no_more_pads)) goto pause; gst_object_unref (demux);