Mercurial > libavformat.hg
changeset 4146:af6cde9a76d1 libavformat
10l set AVPacket.size to the true size of the returned data instead of
the (larger) allocated size. (prevents segfaults due to later failures
from 900MB-sized packets, yes fuzzed file not a valid one)
author | michael |
---|---|
date | Wed, 31 Dec 2008 02:47:54 +0000 |
parents | c1c1a6d0d529 |
children | b3d75fa26b5c |
files | rmdec.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rmdec.c Wed Dec 31 01:54:54 2008 +0000 +++ b/rmdec.c Wed Dec 31 02:47:54 2008 +0000 @@ -551,7 +551,7 @@ if(vst->slices != vst->cur_slice) //FIXME find out how to set slices correct from the begin memmove(pkt->data + 1 + 8*vst->cur_slice, pkt->data + 1 + 8*vst->slices, vst->videobufpos - 1 - 8*vst->slices); - pkt->size += 8*(vst->cur_slice - vst->slices); + pkt->size = vst->videobufpos + 8*(vst->cur_slice - vst->slices); pkt->pts = AV_NOPTS_VALUE; pkt->pos = vst->pktpos; return 0;