1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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)

Originally committed as revision 16404 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2008-12-31 02:47:54 +00:00
parent 188e67eaf4
commit ce0453aac9

View File

@ -551,7 +551,7 @@ static int rm_assemble_video_frame(AVFormatContext *s, ByteIOContext *pb,
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;