aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-12-06 17:21:17 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-12-06 17:21:17 +0000
commit18ade9543fe07620ad429747a6f1266b09627c18 (patch)
treefc08c3397890bccda50ee52e5cbf7e7db3050822 /libavcodec
parentd880240e1814b991f0916a1947e2675569ea1637 (diff)
downloadffmpeg-18ade9543fe07620ad429747a6f1266b09627c18.tar.gz
rv10 thread safety fix / rv10 ffplay fix
Originally committed as revision 3733 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/rv10.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index 663d8adb3d..7dc3ea21f6 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -276,9 +276,8 @@ static int get_num(GetBitContext *gb)
/* read RV 1.0 compatible frame header */
static int rv10_decode_picture_header(MpegEncContext *s)
{
- int mb_count, pb_frame, marker, full_frame, unk;
+ int mb_count, pb_frame, marker, unk, mb_xy;
- full_frame= s->avctx->slice_count==1;
//printf("ff:%d\n", full_frame);
marker = get_bits(&s->gb, 1);
@@ -321,7 +320,9 @@ static int rv10_decode_picture_header(MpegEncContext *s)
}
/* if multiple packets per frame are sent, the position at which
to display the macro blocks is coded here */
- if ((!full_frame) || show_bits(&s->gb, 12)==0) {
+
+ mb_xy= s->mb_x + s->mb_y*s->mb_width;
+ if(show_bits(&s->gb, 12)==0 || (mb_xy && mb_xy < s->mb_num)){
s->mb_x = get_bits(&s->gb, 6); /* mb_x */
s->mb_y = get_bits(&s->gb, 6); /* mb_y */
mb_count = get_bits(&s->gb, 12);