# HG changeset patch # User rtogni # Date 1195430578 0 # Node ID 1d31f550e6d7673487d2caba05b525a061eaeede # Parent 7f8b30acb7c78eabbf8d2eedababa838be65da8b Cosmetics diff -r 7f8b30acb7c7 -r 1d31f550e6d7 rmdec.c --- a/rmdec.c Mon Nov 19 00:02:03 2007 +0000 +++ b/rmdec.c Mon Nov 19 00:02:58 2007 +0000 @@ -501,9 +501,8 @@ rm->curpic_num = pic_num; rm->pktpos = url_ftell(pb); } - if(type == 2){ + if(type == 2) len = FFMIN(len, pos); - } if(++rm->cur_slice > rm->slices) return 1; @@ -521,7 +520,8 @@ if(av_new_packet(pkt, rm->videobufpos - 8*(rm->slices - rm->cur_slice)) < 0) return AVERROR(ENOMEM); memcpy(pkt->data, rm->videobuf, 1 + 8*rm->cur_slice); - memcpy(pkt->data + 1 + 8*rm->cur_slice, rm->videobuf + 1 + 8*rm->slices, rm->videobufpos - 1 - 8*rm->slices); + memcpy(pkt->data + 1 + 8*rm->cur_slice, rm->videobuf + 1 + 8*rm->slices, + rm->videobufpos - 1 - 8*rm->slices); pkt->pts = AV_NOPTS_VALUE; pkt->pos = rm->pktpos; return 0;