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

Diego Biurrun diego
Mon Apr 9 16:06:56 CEST 2007


On Mon, Apr 09, 2007 at 02:09:26PM +0200, Michael Niedermayer wrote:
> 
> On Mon, Apr 09, 2007 at 01:21:58PM +0200, Reinhard Nissl wrote:
> > 
> > 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

Applied.

Diego




More information about the ffmpeg-devel mailing list