Skip to content

Commit e498365

Browse files
committed
fix #337 sdp time zone & repeat parse error
1 parent c0ade3f commit e498365

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

librtsp/source/sdp.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ static int sdp_parse_repeat(struct sdp_t* sdp)
756756
r->duration = sdp->raw + sdp->offset;
757757
n[1] = sdp_token_word(sdp, " \t\r\n");
758758

759-
while(strchr(" \t", sdp->raw[sdp->offset]))
759+
while(sdp->raw[sdp->offset] && strchr(" \t", sdp->raw[sdp->offset]))
760760
{
761761
if(n[2] > 0 && offset)
762762
{
@@ -829,11 +829,11 @@ static int sdp_parse_timezone(struct sdp_t* sdp)
829829
t->z.capacity += 8;
830830
}
831831

832-
z = &t->z.ptr[t->r.count - N_TIMEZONE];
832+
z = &t->z.ptr[t->z.count - N_TIMEZONE];
833833
}
834834
else
835835
{
836-
z = &t->z.timezones[t->r.count];
836+
z = &t->z.timezones[t->z.count];
837837
}
838838

839839
z->time = time;

0 commit comments

Comments
 (0)