Commit 3857fb21 authored by michael's avatar michael

get_bits(32) fix


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3393 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent f8a76268
...@@ -1915,21 +1915,21 @@ read_header: ...@@ -1915,21 +1915,21 @@ read_header:
skip_bits(&hgb, 32); /* reserved zeros */ skip_bits(&hgb, 32); /* reserved zeros */
if (get_bits(&hgb, 32) != be2me_32(ff_get_fourcc("mjpg"))) if (get_bits_long(&hgb, 32) != be2me_32(ff_get_fourcc("mjpg")))
{ {
dprintf("not mjpeg-b (bad fourcc)\n"); dprintf("not mjpeg-b (bad fourcc)\n");
return 0; return 0;
} }
field_size = get_bits(&hgb, 32); /* field size */ field_size = get_bits_long(&hgb, 32); /* field size */
dprintf("field size: 0x%x\n", field_size); dprintf("field size: 0x%x\n", field_size);
skip_bits(&hgb, 32); /* padded field size */ skip_bits(&hgb, 32); /* padded field size */
second_field_offs = get_bits(&hgb, 32); second_field_offs = get_bits_long(&hgb, 32);
dprintf("second field offs: 0x%x\n", second_field_offs); dprintf("second field offs: 0x%x\n", second_field_offs);
if (second_field_offs) if (second_field_offs)
s->interlaced = 1; s->interlaced = 1;
dqt_offs = get_bits(&hgb, 32); dqt_offs = get_bits_long(&hgb, 32);
dprintf("dqt offs: 0x%x\n", dqt_offs); dprintf("dqt offs: 0x%x\n", dqt_offs);
if (dqt_offs) if (dqt_offs)
{ {
...@@ -1938,7 +1938,7 @@ read_header: ...@@ -1938,7 +1938,7 @@ read_header:
mjpeg_decode_dqt(s); mjpeg_decode_dqt(s);
} }
dht_offs = get_bits(&hgb, 32); dht_offs = get_bits_long(&hgb, 32);
dprintf("dht offs: 0x%x\n", dht_offs); dprintf("dht offs: 0x%x\n", dht_offs);
if (dht_offs) if (dht_offs)
{ {
...@@ -1947,7 +1947,7 @@ read_header: ...@@ -1947,7 +1947,7 @@ read_header:
mjpeg_decode_dht(s); mjpeg_decode_dht(s);
} }
sof_offs = get_bits(&hgb, 32); sof_offs = get_bits_long(&hgb, 32);
dprintf("sof offs: 0x%x\n", sof_offs); dprintf("sof offs: 0x%x\n", sof_offs);
if (sof_offs) if (sof_offs)
{ {
...@@ -1957,7 +1957,7 @@ read_header: ...@@ -1957,7 +1957,7 @@ read_header:
return -1; return -1;
} }
sos_offs = get_bits(&hgb, 32); sos_offs = get_bits_long(&hgb, 32);
dprintf("sos offs: 0x%x\n", sos_offs); dprintf("sos offs: 0x%x\n", sos_offs);
if (sos_offs) if (sos_offs)
{ {
......
...@@ -2719,16 +2719,16 @@ static int theora_decode_comments(AVCodecContext *avctx, GetBitContext gb) ...@@ -2719,16 +2719,16 @@ static int theora_decode_comments(AVCodecContext *avctx, GetBitContext gb)
{ {
int nb_comments, i, tmp; int nb_comments, i, tmp;
tmp = get_bits(&gb, 32); tmp = get_bits_long(&gb, 32);
tmp = be2me_32(tmp); tmp = be2me_32(tmp);
while(tmp--) while(tmp--)
skip_bits(&gb, 8); skip_bits(&gb, 8);
nb_comments = get_bits(&gb, 32); nb_comments = get_bits_long(&gb, 32);
nb_comments = be2me_32(nb_comments); nb_comments = be2me_32(nb_comments);
for (i = 0; i < nb_comments; i++) for (i = 0; i < nb_comments; i++)
{ {
tmp = get_bits(&gb, 32); tmp = get_bits_long(&gb, 32);
tmp = be2me_32(tmp); tmp = be2me_32(tmp);
while(tmp--) while(tmp--)
skip_bits(&gb, 8); skip_bits(&gb, 8);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment