]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commit
Prevent (negative) overflow of rm->remaining_len. This evaluation really only
authorrbultje <rbultje@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 9 Mar 2009 13:08:19 +0000 (13:08 +0000)
committerrbultje <rbultje@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 9 Mar 2009 13:08:19 +0000 (13:08 +0000)
commit7b076aff9b5e661f78b3706d4f0904c5c3266783
treed3cb442d42a8cafce22b604f6a36c7d5de1bee3e
parent104c2716d2a715a2718a14027508c7949e0c5523
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
libavformat/rmdec.c