[MPlayer-dev-eng] [PATCH] syncing dvdread - part1

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Aug 7 00:00:48 CEST 2007


Hello,
On Mon, Aug 06, 2007 at 11:19:47PM +0200, Nico Sabbi wrote:
>  Attached patch adds the implementation of getbits() used in dvdread from 
>  dvdnav, necessary to get navigation parsing working.
>  The code will be used by a forthcoming patch.
>  If no one objects I'll commit it tomorrow

Well, if this is only a sync it may not make sense, but...

> +  if ((state == NULL) || (start == NULL)) return 0;

> +  if ((state->bit_position) > 0) {  /* Last getbits left us in the middle of a byte. */

> +      byte = byte >> (state->bit_position);

> +  if ((state->bit_position) == 0) {

There are really lots of useless () (and I almost always prefer !ptr
over ptr == NULL and at least sometimes !var over var == 0).

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list