Skip to content

Commit

Permalink
fix #337 sdp time zone & repeat parse error
Browse files Browse the repository at this point in the history
  • Loading branch information
ireader committed May 25, 2024
1 parent c0ade3f commit e498365
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions librtsp/source/sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ static int sdp_parse_repeat(struct sdp_t* sdp)
r->duration = sdp->raw + sdp->offset;
n[1] = sdp_token_word(sdp, " \t\r\n");

while(strchr(" \t", sdp->raw[sdp->offset]))
while(sdp->raw[sdp->offset] && strchr(" \t", sdp->raw[sdp->offset]))
{
if(n[2] > 0 && offset)
{
Expand Down Expand Up @@ -829,11 +829,11 @@ static int sdp_parse_timezone(struct sdp_t* sdp)
t->z.capacity += 8;
}

z = &t->z.ptr[t->r.count - N_TIMEZONE];
z = &t->z.ptr[t->z.count - N_TIMEZONE];
}
else
{
z = &t->z.timezones[t->r.count];
z = &t->z.timezones[t->z.count];
}

z->time = time;
Expand Down

0 comments on commit e498365

Please sign in to comment.