Skip to content

Commit

Permalink
Update main.cpp
Browse files Browse the repository at this point in the history
adds termination via ctrl-c
  • Loading branch information
JohnDGodwin authored Jan 11, 2025
1 parent 94e3606 commit 1081270
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::vector<uint8_t>> frame){
auto cb=[&packet,/*&decoder_stalled_count,*/ &bytes_received, &period_start, &signal_flag](std::shared_ptr<std::vector<uint8_t>> frame){

if (signal_flag) {
return;
}

// Let the gst pull thread run at quite high priority
static bool first= false;
if(first){
Expand Down

0 comments on commit 1081270

Please sign in to comment.