Skip to content

Commit

Permalink
Fixed invalid timestamps calculations inside rtp serializer (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
Qizot authored Nov 10, 2021
1 parent ac6191b commit c8f038f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/membrane/rtp/serializer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ defmodule Membrane.RTP.Serializer do
{rtp_metadata, metadata} = Map.pop(metadata, :rtp, %{})

rtp_offset =
rtp_metadata
|> buffer_timestamp(metadata)
metadata.timestamp
|> Ratio.mult(state.clock_rate)
|> Membrane.Time.to_seconds()

Expand All @@ -94,7 +93,4 @@ defmodule Membrane.RTP.Serializer do

{{:ok, buffer: {:output, buffer}}, state}
end

defp buffer_timestamp(%{timestamp: timestamp}, _metadata), do: timestamp
defp buffer_timestamp(_rtp_metadata, %{timestamp: timestamp}), do: timestamp
end

0 comments on commit c8f038f

Please sign in to comment.