fixed 10l
authorAlex Beregszaszi <alex@rtfs.hu>
Thu, 31 Oct 2002 09:24:25 +0000 (09:24 +0000)
committerAlex Beregszaszi <alex@rtfs.hu>
Thu, 31 Oct 2002 09:24:25 +0000 (09:24 +0000)
Originally committed as revision 1124 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/mjpeg.c

index 292cd7d0fea44751369713bfd89f5e562f6dcb60..63da9a790427eabde8a029d4445b3ada1f60cc8d 100644 (file)
@@ -1068,7 +1068,8 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
     if (len < 5)
        return -1;
 
-    id = be2me_32((get_bits(&s->gb, 16) << 16) | get_bits(&s->gb, 16));
+    id = (get_bits(&s->gb, 16) << 16) | get_bits(&s->gb, 16);
+    id = be2me_32(id);
     len -= 6;
 
     /* buggy AVID, it puts EOI only at every 10th frame */
@@ -1124,7 +1125,8 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
     /* Apple MJPEG-A */
     if ((s->start_code == APP1) && (len > (0x28 - 8)))
     {
-       id = be2me_32((get_bits(&s->gb, 16) << 16) | get_bits(&s->gb, 16));
+       id = (get_bits(&s->gb, 16) << 16) | get_bits(&s->gb, 16);
+       id = be2me_32(id);
        len -= 4;
        if (id == ff_get_fourcc("mjpg")) /* Apple MJPEG-A */
        {