diff options
author | Alexander Strange <astrange@ithinksw.com> | 2008-05-11 23:39:55 +0000 |
---|---|---|
committer | Alexander Strange <astrange@ithinksw.com> | 2008-05-11 23:39:55 +0000 |
commit | 5da1ab1ae14c9b01015eb174820cdb32cad96d54 (patch) | |
tree | 5ed986e2f6728f7afbf3d10acd538a201c1cc80e /libavcodec | |
parent | eacced45c47222efebcf66bfced9375a16490e07 (diff) | |
download | ffmpeg-5da1ab1ae14c9b01015eb174820cdb32cad96d54.tar.gz |
Previous commit missed an initialization - this fixes FATE's test sample.
Originally committed as revision 13131 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/svq3.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index ac16cd8354..340ca12035 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -681,11 +681,9 @@ static int svq3_decode_mb (H264Context *h, unsigned int mb_type) { static int svq3_decode_slice_header (H264Context *h) { MpegEncContext *const s = (MpegEncContext *) h; - int mb_xy; + const int mb_xy = h->mb_xy; int i, header; - mb_xy = h->mb_xy = s->mb_x + s->mb_y*s->mb_stride; - header = get_bits (&s->gb, 8); if (((header & 0x9F) != 1 && (header & 0x9F) != 2) || (header & 0x60) == 0) { @@ -844,7 +842,7 @@ static int svq3_decode_frame (AVCodecContext *avctx, 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)) return -1; @@ -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_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 && ((get_bits_count(&s->gb) & 7) == 0 || show_bits (&s->gb, (-get_bits_count(&s->gb) & 7)) == 0)) { |