Originally committed as revision 3733 to svn://svn.ffmpeg.org/ffmpeg/trunk
Michael Niedermayer authored on 2004/12/07 02:21:17... | ... |
@@ -276,9 +276,8 @@ static int get_num(GetBitContext *gb) |
276 | 276 |
/* read RV 1.0 compatible frame header */ |
277 | 277 |
static int rv10_decode_picture_header(MpegEncContext *s) |
278 | 278 |
{ |
279 |
- int mb_count, pb_frame, marker, full_frame, unk; |
|
279 |
+ int mb_count, pb_frame, marker, unk, mb_xy; |
|
280 | 280 |
|
281 |
- full_frame= s->avctx->slice_count==1; |
|
282 | 281 |
//printf("ff:%d\n", full_frame); |
283 | 282 |
marker = get_bits(&s->gb, 1); |
284 | 283 |
|
... | ... |
@@ -321,7 +320,9 @@ static int rv10_decode_picture_header(MpegEncContext *s) |
321 | 321 |
} |
322 | 322 |
/* if multiple packets per frame are sent, the position at which |
323 | 323 |
to display the macro blocks is coded here */ |
324 |
- if ((!full_frame) || show_bits(&s->gb, 12)==0) { |
|
324 |
+ |
|
325 |
+ mb_xy= s->mb_x + s->mb_y*s->mb_width; |
|
326 |
+ if(show_bits(&s->gb, 12)==0 || (mb_xy && mb_xy < s->mb_num)){ |
|
325 | 327 |
s->mb_x = get_bits(&s->gb, 6); /* mb_x */ |
326 | 328 |
s->mb_y = get_bits(&s->gb, 6); /* mb_y */ |
327 | 329 |
mb_count = get_bits(&s->gb, 12); |
... | ... |
@@ -791,12 +791,7 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt) |
791 | 791 |
} |
792 | 792 |
/* picture number */ |
793 | 793 |
pic_num= get_byte(pb); |
794 |
- |
|
795 |
- //XXX/FIXME/HACK, demuxer should be fixed to send complete frames ... |
|
796 |
- if(st->codec.slice_offset==NULL) |
|
797 |
- st->codec.slice_offset= (int*)av_malloc(sizeof(int)); |
|
798 |
- st->codec.slice_count= full_frame; |
|
799 |
- st->codec.slice_offset[0]= 0; |
|
794 |
+// av_log(NULL, AV_LOG_DEBUG, "%X %d\n", h, pic_num); |
|
800 | 795 |
} |
801 | 796 |
|
802 | 797 |
av_new_packet(pkt, len); |