Repository navigation
Commit 5e293ce
committed
fix: keep what a seek decoded at the new position
MediaPlayer::Seek flushed the pacer after releasing its lock. When the decode thread performed the seek in between and decoded at the new position, that flush threw it away: an audio source, decoded seconds ahead, skipped ahead or ended at once. The flush now happens under the lock the decode thread takes the request with. This made MediaPlayerTest.positionFollowsABackwardSeekOfAudio fail now and then, which now also checks that playback goes on.1 parent 704a166 commit 5e293ce
2 files changed
Lines changed: 19 additions & 11 deletions
File tree
- webrtc-java-media/src
- main/cpp/src/media
- test/java/dev/onvoid/webrtc/media/player
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 159 | + | |
169 | 160 | | |
170 | | - | |
| 161 | + | |
| 162 | + | |
171 | 163 | | |
172 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
173 | 169 | | |
174 | 170 | | |
175 | 171 | | |
176 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
177 | 178 | | |
| 179 | + | |
| 180 | + | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
338 | 343 | | |
339 | 344 | | |
340 | 345 | | |
| |||
0 commit comments