Commit b6eb7aa4 authored by astrange's avatar astrange

Previous commit missed an initialization - this fixes FATE's test sample.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13131 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 28a8e08a
...@@ -681,11 +681,9 @@ static int svq3_decode_mb (H264Context *h, unsigned int mb_type) { ...@@ -681,11 +681,9 @@ static int svq3_decode_mb (H264Context *h, unsigned int mb_type) {
static int svq3_decode_slice_header (H264Context *h) { static int svq3_decode_slice_header (H264Context *h) {
MpegEncContext *const s = (MpegEncContext *) h; MpegEncContext *const s = (MpegEncContext *) h;
int mb_xy; const int mb_xy = h->mb_xy;
int i, header; int i, header;
mb_xy = h->mb_xy = s->mb_x + s->mb_y*s->mb_stride;
header = get_bits (&s->gb, 8); header = get_bits (&s->gb, 8);
if (((header & 0x9F) != 1 && (header & 0x9F) != 2) || (header & 0x60) == 0) { if (((header & 0x9F) != 1 && (header & 0x9F) != 2) || (header & 0x60) == 0) {
...@@ -844,7 +842,7 @@ static int svq3_decode_frame (AVCodecContext *avctx, ...@@ -844,7 +842,7 @@ static int svq3_decode_frame (AVCodecContext *avctx,
init_get_bits (&s->gb, buf, 8*buf_size); init_get_bits (&s->gb, buf, 8*buf_size);
s->mb_x = s->mb_y = 0; s->mb_x = s->mb_y = h->mb_xy = 0;
if (svq3_decode_slice_header (h)) if (svq3_decode_slice_header (h))
return -1; return -1;
...@@ -917,6 +915,7 @@ static int svq3_decode_frame (AVCodecContext *avctx, ...@@ -917,6 +915,7 @@ static int svq3_decode_frame (AVCodecContext *avctx,
for (s->mb_y=0; s->mb_y < s->mb_height; s->mb_y++) { for (s->mb_y=0; s->mb_y < s->mb_height; s->mb_y++) {
for (s->mb_x=0; s->mb_x < s->mb_width; s->mb_x++) { for (s->mb_x=0; s->mb_x < s->mb_width; s->mb_x++) {
h->mb_xy = s->mb_x + s->mb_y*s->mb_stride;
if ( (get_bits_count(&s->gb) + 7) >= s->gb.size_in_bits && if ( (get_bits_count(&s->gb) + 7) >= s->gb.size_in_bits &&
((get_bits_count(&s->gb) & 7) == 0 || show_bits (&s->gb, (-get_bits_count(&s->gb) & 7)) == 0)) { ((get_bits_count(&s->gb) & 7) == 0 || show_bits (&s->gb, (-get_bits_count(&s->gb) & 7)) == 0)) {
......
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