mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
module-rtp: don't deref io_position when NULL
This commit is contained in:
parent
a3875c38ac
commit
026c55c0ce
1 changed files with 2 additions and 1 deletions
|
|
@ -24,11 +24,12 @@ static void rtp_midi_process_playback(void *data)
|
|||
|
||||
/* we always use the graph position to select events, the receiver side is
|
||||
* responsible for smoothing out the RTP timestamps to graph time */
|
||||
duration = impl->io_position->clock.duration;
|
||||
if (impl->io_position) {
|
||||
duration = impl->io_position->clock.duration;
|
||||
timestamp = impl->io_position->clock.position;
|
||||
rate = impl->io_position->clock.rate.denom;
|
||||
} else {
|
||||
duration = 8192;
|
||||
timestamp = 0;
|
||||
rate = impl->rate;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue