comparison rmdec.c @ 5172:06b0c8fd923f libavformat

When resetting vst->pkt.data to NULL, also set vst->slices. This avoids a crash when the next slice is not a start slice and thus pkt->data is still NULL. This probably only happens with broken or unsupported files like http://samples.mplayerhq.hu/real/multirate/JustaSpa1937_64kb.rm that need further fixes, but keeping vst state consistent is still a good idea.
author reimar
date Sun, 13 Sep 2009 11:08:59 +0000
parents bda20c95dc0d
children d6371dd2bec4
comparison
equal deleted inserted replaced
5171:44e53fe2e9ca 5172:06b0c8fd923f
635 memmove(pkt->data + 1 + 8*vst->cur_slice, pkt->data + 1 + 8*vst->slices, 635 memmove(pkt->data + 1 + 8*vst->cur_slice, pkt->data + 1 + 8*vst->slices,
636 vst->videobufpos - 1 - 8*vst->slices); 636 vst->videobufpos - 1 - 8*vst->slices);
637 pkt->size = vst->videobufpos + 8*(vst->cur_slice - vst->slices); 637 pkt->size = vst->videobufpos + 8*(vst->cur_slice - vst->slices);
638 pkt->pts = AV_NOPTS_VALUE; 638 pkt->pts = AV_NOPTS_VALUE;
639 pkt->pos = vst->pktpos; 639 pkt->pos = vst->pktpos;
640 vst->slices = 0;
640 return 0; 641 return 0;
641 } 642 }
642 643
643 return 1; 644 return 1;
644 } 645 }