Skip to content

Commit ac9f3fa

Browse files
authored
Fix: Start ByteStreamWriter chunk index at 0 #430 (#431)
1 parent 6e8cfc3 commit ac9f3fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

livekit-rtc/livekit/rtc/data_stream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,13 @@ async def write(self, data: bytes):
340340
]
341341

342342
for chunk in chunked_data:
343-
self._next_chunk_index += 1
344343
chunk_msg = proto_DataStream.Chunk(
345344
stream_id=self._header.stream_id,
346345
chunk_index=self._next_chunk_index,
347346
content=chunk,
348347
)
349348
await self._send_chunk(chunk_msg)
349+
self._next_chunk_index += 1
350350

351351
@property
352352
def info(self) -> ByteStreamInfo:

0 commit comments

Comments
 (0)