Commit 8e7e6404 authored by michael's avatar michael

rv10 thread safety fix / rv10 ffplay fix


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3733 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent a8db3851
...@@ -276,9 +276,8 @@ static int get_num(GetBitContext *gb) ...@@ -276,9 +276,8 @@ static int get_num(GetBitContext *gb)
/* read RV 1.0 compatible frame header */ /* read RV 1.0 compatible frame header */
static int rv10_decode_picture_header(MpegEncContext *s) 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); //printf("ff:%d\n", full_frame);
marker = get_bits(&s->gb, 1); marker = get_bits(&s->gb, 1);
...@@ -321,7 +320,9 @@ static int rv10_decode_picture_header(MpegEncContext *s) ...@@ -321,7 +320,9 @@ static int rv10_decode_picture_header(MpegEncContext *s)
} }
/* if multiple packets per frame are sent, the position at which /* if multiple packets per frame are sent, the position at which
to display the macro blocks is coded here */ 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_x = get_bits(&s->gb, 6); /* mb_x */
s->mb_y = get_bits(&s->gb, 6); /* mb_y */ s->mb_y = get_bits(&s->gb, 6); /* mb_y */
mb_count = get_bits(&s->gb, 12); mb_count = get_bits(&s->gb, 12);
......
...@@ -791,12 +791,7 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -791,12 +791,7 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt)
} }
/* picture number */ /* picture number */
pic_num= get_byte(pb); pic_num= get_byte(pb);
// av_log(NULL, AV_LOG_DEBUG, "%X %d\n", h, pic_num);
//XXX/FIXME/HACK, demuxer should be fixed to send complete frames ...
if(st->codec.slice_offset==NULL)
st->codec.slice_offset= (int*)av_malloc(sizeof(int));
st->codec.slice_count= full_frame;
st->codec.slice_offset[0]= 0;
} }
av_new_packet(pkt, len); av_new_packet(pkt, len);
......
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