Skip to content

Commit

Permalink
Apply reviewers suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
Noarkhh committed Feb 23, 2024
1 parent 088936e commit bf50ec9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/membrane/rtp/rtsp_decapsulator.ex
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,17 @@ defmodule Membrane.RTP.RTSP.Decapsulator do
channel_id,
complete_packets
) do
if payload_length > byte_size(rest) do
{packets_binary, Enum.reverse(complete_packets)}
else
<<complete_packet_binary::binary-size(payload_length)-unit(8), rest::binary>> = rest
case rest do
<<complete_packet_binary::binary-size(payload_length)-unit(8), rest::binary>> ->
complete_packets =
if channel_id != received_channel_id,
do: complete_packets,
else: [complete_packet_binary | complete_packets]

complete_packets =
if channel_id != received_channel_id,
do: complete_packets,
else: [complete_packet_binary | complete_packets]
get_complete_packets(rest, channel_id, complete_packets)

get_complete_packets(rest, channel_id, complete_packets)
_incomplete_packet_binary ->
{packets_binary, Enum.reverse(complete_packets)}
end
end

Expand Down

0 comments on commit bf50ec9

Please sign in to comment.