Commit 7b076aff authored by rbultje's avatar rbultje

Prevent (negative) overflow of rm->remaining_len. This evaluation really only

has two possible outcomes: either len and rm->remaining_len are the same, in
which case we care about the outcome and it is zero, or rm->remaining_len is
currently not in use and we don't care about the outcome. In that case, len
is positive and rm->remaining_len is zero, which leads to a negative result.
This is confusing and could eventually lead to a sign-flip if we skip a lot
of packets (unlikely, but still). Therefore, just always set it to zero.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17910 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 104c2716
......@@ -468,7 +468,7 @@ static int sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stream_
skip:
/* skip packet if unknown number */
url_fskip(pb, len);
rm->remaining_len -= len;
rm->remaining_len = 0;
continue;
}
*stream_index= i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment