[Ffmpeg-devel] h264: fix bit_length calculation for dst_length == 0

Michael Niedermayer michaelni
Mon Apr 9 14:09:26 CEST 2007


Hi

On Mon, Apr 09, 2007 at 01:21:58PM +0200, Reinhard Nissl wrote:
> Hi,
> 
> when dst_length == 0 it's obvious that bit_length has to be 0 too.
> 
> But the current code still calls decode_rbsp_trailing() and therefore
> bit_length might get negative.
> 
> Although the remaining code is able to handle a negative bit_length, I
> think it is better to avoid the calculation at all by setting bit_length
> to 0 for dst_length == 0. The attached patch fixes this issue.

looks ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070409/bc46744f/attachment.pgp>



More information about the ffmpeg-devel mailing list