@@ -921,7 +921,7 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) {
921
921
pthread_cleanup_push (buffer_get_frame_cleanup_handler ,
922
922
(void * )conn ); // undo what's been done so far
923
923
do {
924
-
924
+ pthread_testcancel (); // even if no packets are coming in...
925
925
// get the time
926
926
local_time_now = get_absolute_time_in_ns (); // type okay
927
927
// debug(3, "buffer_get_frame is iterating");
@@ -2269,9 +2269,7 @@ void *player_thread_func(void *arg) {
2269
2269
if (conn -> input_bytes_per_frame == 0 )
2270
2270
debug (1 , "conn->input_bytes_per_frame is zero!" );
2271
2271
2272
- pthread_testcancel (); // allow a pthread_cancel request to take effect.
2273
- abuf_t * inframe = buffer_get_frame (conn ); // this has cancellation point(s), but it's not
2274
- // guaranteed that they'll always be executed
2272
+ abuf_t * inframe = buffer_get_frame (conn ); // this has a (needed!) deliberate cancellation point in it.
2275
2273
uint64_t local_time_now = get_absolute_time_in_ns (); // types okay
2276
2274
config .last_access_to_volume_info_time =
2277
2275
local_time_now ; // ensure volume info remains seen as valid
@@ -3233,14 +3231,6 @@ void *player_thread_func(void *arg) {
3233
3231
frames_seen_in_this_logging_interval = 0 ;
3234
3232
}
3235
3233
3236
- // update the watchdog
3237
- if ((config .dont_check_timeout == 0 ) && (config .timeout != 0 )) {
3238
- uint64_t time_now = get_absolute_time_in_ns ();
3239
- debug_mutex_lock (& conn -> watchdog_mutex , 1000 , 0 );
3240
- conn -> watchdog_bark_time = time_now ;
3241
- debug_mutex_unlock (& conn -> watchdog_mutex , 0 );
3242
- }
3243
-
3244
3234
// debug(1,"Sync error %lld frames. Amount to stuff %d." ,sync_error,amount_to_stuff);
3245
3235
3246
3236
// new stats calculation. We want a running average of sync error, drift, adjustment,
0 commit comments