Skip to content

Commit 59404a2

Browse files
Adjust the constant used to read the sample frames (#2135)
* Updated .h265 frames and improved the looping logic * Revert "Updated .h265 frames and improved the looping logic" except kvsWebRTCClientMaster.c This reverts commit d852593. --------- Co-authored-by: Varunaditya1 <varunaditya.singhal42@gmail.com>
1 parent 6da7514 commit 59404a2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

samples/kvsWebRTCClientMaster.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,11 @@ PVOID sendVideoPackets(PVOID args)
185185
lastFrameTime = startTime;
186186

187187
while (!ATOMIC_LOAD_BOOL(&pSampleConfiguration->appTerminateFlag)) {
188-
fileIndex = fileIndex % NUMBER_OF_H264_FRAME_FILES + 1;
189188
if (pSampleConfiguration->videoCodec == RTC_CODEC_H264_PROFILE_42E01F_LEVEL_ASYMMETRY_ALLOWED_PACKETIZATION_MODE) {
189+
fileIndex = fileIndex % NUMBER_OF_H264_FRAME_FILES + 1;
190190
SNPRINTF(filePath, MAX_PATH_LEN, "./h264SampleFrames/frame-%04d.h264", fileIndex);
191191
} else if (pSampleConfiguration->videoCodec == RTC_CODEC_H265) {
192+
fileIndex = fileIndex % NUMBER_OF_H265_FRAME_FILES + 1;
192193
SNPRINTF(filePath, MAX_PATH_LEN, "./h265SampleFrames/frame-%04d.h265", fileIndex);
193194
}
194195

0 commit comments

Comments
 (0)