From: Jasmin Jessich Date: Sat, 17 Feb 2018 19:37:29 +0000 (+0100) Subject: Added locking of stream mutex to mpegts_input_postdemux X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=357a0e16ed7ef72b9c3cdebceff5da0278215841;p=thirdparty%2Ftvheadend.git Added locking of stream mutex to mpegts_input_postdemux Signed-off-by: Jasmin Jessich --- diff --git a/src/input/mpegts/mpegts_input.c b/src/input/mpegts/mpegts_input.c index e0f2b5d5d..9ac70ca60 100644 --- a/src/input/mpegts/mpegts_input.c +++ b/src/input/mpegts/mpegts_input.c @@ -1597,15 +1597,19 @@ mpegts_input_postdemux if (type & MPS_SERVICE) { LIST_FOREACH(mps, &mp->mp_svc_subs, mps_svcraw_link) { s = mps->mps_owner; + pthread_mutex_lock(&s->s_stream_mutex); st = service_stream_find(s, pid); ts_recv_packet0((mpegts_service_t*)s, st, tsb, llen); + pthread_mutex_unlock(&s->s_stream_mutex); } } else /* Stream table data */ if (type & MPS_STREAM) { LIST_FOREACH(s, &mm->mm_transports, s_active_link) { if (s->s_type != STYPE_STD) continue; + pthread_mutex_lock(&s->s_stream_mutex); ts_recv_packet0((mpegts_service_t*)s, NULL, tsb, llen); + pthread_mutex_unlock(&s->s_stream_mutex); } }