diff --git a/src/main.cpp b/src/main.cpp index 7afa525..121e87f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -396,7 +396,12 @@ void read_gstreamerpipe_stream(MppPacket *packet, int gst_udp_port, const VideoC GstRtpReceiver receiver(gst_udp_port, codec); long long bytes_received = 0; uint64_t period_start=0; - auto cb=[&packet,/*&decoder_stalled_count,*/ &bytes_received, &period_start](std::shared_ptr> frame){ + auto cb=[&packet,/*&decoder_stalled_count,*/ &bytes_received, &period_start, &signal_flag](std::shared_ptr> frame){ + + if (signal_flag) { + return; + } + // Let the gst pull thread run at quite high priority static bool first= false; if(first){