On Tue, Aug 19, 2014 at 09:49:10AM +0200, Christophe Gisquet wrote: > Hi, > > 2014-08-18 21:49 GMT+02:00 Michael Niedermayer <michae...@gmx.at>: > > + int max_slice_size = (ctx->frame_size_upper_bound - 200) / > > (ctx->pictures_per_frame * ctx->slices_per_picture + 1); > > Regarding the reallocation check: > pkt_size <= buf - orig_buf + 2 * max_slice_size > For last slice, pkt_size would be (N+1)*max_slice_size ideally, and > (buf - orig_buf) would be around (N-1)*max_slice_size. Then the check > is ok. > > However, reallocation increases allocated size by: > int delta = 200 + ctx->pictures_per_frame * > ctx->slices_per_picture * max_slice_size - > pkt_size; > > In the same fashion, shouldn't delta computation be updated to be: > 200 + (ctx->pictures_per_frame * ctx->slices_per_picture + 1) * etc ?
yes, locally changed [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I know you won't believe me, but the highest form of Human Excellence is to question oneself and others. -- Socrates
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel