attached is the updated patch (thanks Måns for giving feedback on the
earlier patch)
-Nathan


2011/12/2 Måns Rullgård <[email protected]>

> Nathan Maxson <[email protected]> writes:
>
> > -            if ( (opcode & 0x80) == 0 ) {
> > +            if (opcode & 0x80 == 0) {
>
> [...]
>
> > -            } else if ( (opcode & 0x40) == 0 ) {
> > +            } else if (opcode & 0x40 == 0) {
>
> These are wrong.  Relational operators have higher precedence than bitwise.
>
> >          case 0:
> >              flag ^= 1;
> >              continue;
> > -
> >          case 1:
> >          case 2:
> >          case 3:
> > @@ -344,7 +342,6 @@ static int xan_wc3_decode_frame(XanContext *s) {
> >          case 8:
> >              size = opcode;
> >              break;
> > -
> >          case 12:
> >          case 13:
> >          case 14:
> > @@ -354,24 +351,22 @@ static int xan_wc3_decode_frame(XanContext *s) {
> >          case 18:
> >              size += (opcode - 10);
> >              break;
> > -
> >          case 9:
> >          case 19:
> >              size = *size_segment++;
> >              break;
> > -
> >          case 10:
> >          case 20:
> >              size = AV_RB16(&size_segment[0]);
> >              size_segment += 2;
> >              break;
> > -
> >          case 11:
> >          case 21:
> >              size = AV_RB24(size_segment);
> >              size_segment += 3;
> >              break;
> >          }
>
> I'd leave those blank lines.
>
> --
> Måns Rullgård
> [email protected]
> _______________________________________________
> libav-devel mailing list
> [email protected]
> https://lists.libav.org/mailman/listinfo/libav-devel
>

Attachment: 0001-fixed-the-coding-style-in-xan.c-updated.patch
Description: Binary data

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to