From f29c19be5821d26a6b7682d0c69ff31d0815e072 Mon Sep 17 00:00:00 2001 From: Vivia Nikolaidou Date: Fri, 9 Sep 2022 13:13:32 +0300 Subject: [PATCH] splitmuxsink: Avoid assertion when WAITING_GOP_COLLECT on reference context I have seen a backtrace out in the wild where this happened. Maybe after receiving EOS and stream-start on the reference context. Part-of: --- subprojects/gst-plugins-good/gst/multifile/gstsplitmuxsink.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-good/gst/multifile/gstsplitmuxsink.c b/subprojects/gst-plugins-good/gst/multifile/gstsplitmuxsink.c index 5e4ae02..ad6c3d3 100644 --- a/subprojects/gst-plugins-good/gst/multifile/gstsplitmuxsink.c +++ b/subprojects/gst-plugins-good/gst/multifile/gstsplitmuxsink.c @@ -3178,11 +3178,13 @@ handle_mq_input (GstPad * pad, GstPadProbeInfo * info, MqStreamCtx * ctx) } break; case SPLITMUX_INPUT_STATE_WAITING_GOP_COLLECT:{ - /* We're collecting a GOP, this is only ever called for non-reference + /* We're collecting a GOP, this is normally only called for non-reference * contexts as the reference context would be waiting inside * check_completed_gop() */ - - g_assert (!ctx->is_reference); + if (G_UNLIKELY (ctx->is_reference)) { + check_completed_gop (splitmux, ctx); + break; + } /* If we overran the target timestamp, it might be time to process * the GOP, otherwise bail out for more data. */ -- 2.7.4