Hi, On Wed, Dec 12, 2012 at 3:12 PM, Janne Grunau <janne-li...@jannau.net> wrote: > On 2012-12-12 14:30:43 -0800, Ronald S. Bultje wrote: >> Hi, >> >> On Wed, Dec 12, 2012 at 12:30 PM, Janne Grunau <janne-li...@jannau.net> >> wrote: >> > cmdutis.c's alloc_buffer() uses aligned to 32 width plus 2 edges of 32 >> > pixels as linesize. emu_edge_buffer has to work with the same stride. >> > This makes only a difference for > 8 bit per pixel bit depths since we >> > always allocate for 16 bit per pixel. >> > >> > Fixes fuzzed sample nasa-8s2.ts_s244342. >> > --- >> > libavcodec/mpegvideo.c | 13 ++++++++----- >> > 1 file changed, 8 insertions(+), 5 deletions(-) >> >> What if we implement a custom get_buffer() which returns bigger strides? > > it fails horrible for high pixel bit depth like it does with this > sample. I could add an assumed_linesize into the context and realloc if > the linesize returned by get_buffer is larger or maybe preallocate a > buffer here if it' feasible.
Can't you allocate these buffers after you receive the first buffer from get_buffer() and actually know the linesize? Ronald _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel