Skip to content

Commit

Permalink
Fix nrestart increment
Browse files Browse the repository at this point in the history
  • Loading branch information
sauwming committed Dec 19, 2024
1 parent 43bdeaa commit 387ccc8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pjmedia/src/pjmedia-audiodev/oboe_dev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -783,8 +783,9 @@ class MyOboeEngine : oboe::AudioStreamDataCallback,
Stop();

if (nrestart < MAX_RESTART) {
++nrestart;
PJ_LOG(3, (THIS_FILE, "Trying to restart Oboe %s stream #%d",
dir_st, ++nrestart));
dir_st, nrestart));
status = Start();
} else {
status = PJMEDIA_EAUD_SYSERR;
Expand Down Expand Up @@ -889,7 +890,7 @@ class MyOboeEngine : oboe::AudioStreamDataCallback,
/* Increment timestamp */
pj_add_timestamp32(&this_->ts, ts_inc);
++cnt;
this_-> nrestart = 0;
this_->nrestart = 0;
}

if (stop_stream)
Expand Down Expand Up @@ -925,7 +926,7 @@ class MyOboeEngine : oboe::AudioStreamDataCallback,

/* Increment timestamp */
pj_add_timestamp32(&this_->ts, ts_inc);
this_-> nrestart = 0;
this_->nrestart = 0;
}
}

Expand Down

0 comments on commit 387ccc8

Please sign in to comment.