Skip to content

Commit 43f8c5d

Browse files
committed
ff_ffplay: fix subtitle ptr minus warning
1 parent 417f3dc commit 43f8c5d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ijkmedia/ijkplayer/ff_ffplay.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ static void free_picture(Frame *vp)
625625
// FFP_MERGE: upload_texture
626626
// FFP_MERGE: video_image_display
627627

628-
static int parse_ass_subtitle(const char *ass, char *output)
628+
static size_t parse_ass_subtitle(const char *ass, char *output)
629629
{
630630
char *tok = NULL;
631631
tok = strchr(ass, ':'); if (tok) tok += 1; // skip event
@@ -640,18 +640,18 @@ static int parse_ass_subtitle(const char *ass, char *output)
640640
tok = strchr(tok, ','); if (tok) tok += 1; // skip effect
641641
if (tok) {
642642
char *text = tok;
643-
int idx = 0;
643+
size_t idx = 0;
644644
do {
645645
char *found = strstr(text, "\\N");
646646
if (found) {
647-
int n = found - text;
647+
size_t n = found - text;
648648
memcpy(output+idx, text, n);
649649
output[idx + n] = '\n';
650650
idx = n + 1;
651651
text = found + 2;
652652
}
653653
else {
654-
int left_text_len = strlen(text);
654+
size_t left_text_len = strlen(text);
655655
memcpy(output+idx, text, left_text_len);
656656
if (output[idx + left_text_len - 1] == '\n')
657657
output[idx + left_text_len - 1] = '\0';

0 commit comments

Comments
 (0)