changeset 811:972c8ee102d6 libavcodec

fixed 10l
author al3x
date Thu, 31 Oct 2002 09:24:25 +0000
parents 8c8c3b6ff8c1
children 607e867a8be4
files mjpeg.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mjpeg.c	Thu Oct 31 01:42:59 2002 +0000
+++ b/mjpeg.c	Thu Oct 31 09:24:25 2002 +0000
@@ -1068,7 +1068,8 @@
     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 @@
     /* 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 */
 	{