vlc/vlc-2.2 | branch: master | Tristan Matthews <[email protected]> | Sun Jul 6 13:06:06 2014 -0400| [a0f2a5fdda68c413c0682e889013ed4fe9158d05] | committer: Tristan Matthews
avcodec: fix TIFF encoding for older lavc Fixes #11605 > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=a0f2a5fdda68c413c0682e889013ed4fe9158d05 --- modules/codec/avcodec/encoder.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c index b2eed27..860556f 100644 --- a/modules/codec/avcodec/encoder.c +++ b/modules/codec/avcodec/encoder.c @@ -1167,7 +1167,12 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict ) p_sys->p_context->bits_per_coded_sample ? p_sys->p_context->bits_per_coded_sample : 24; - const int blocksize = __MAX( FF_MIN_BUFFER_SIZE, ( bitsPerPixel * p_sys->p_context->height * p_sys->p_context->width ) / 8 + 200 ); + unsigned blocksize = __MAX( FF_MIN_BUFFER_SIZE, ( bitsPerPixel * p_sys->p_context->height * p_sys->p_context->width ) / 8 + 200 ); + if( p_enc->fmt_out.i_codec == VLC_CODEC_TIFF ) + { + blocksize = 2 * blocksize + + 4 * p_sys->p_context->height; /* space for strip sizes */ + } block_t *p_block = block_Alloc( blocksize ); if( unlikely(p_block == NULL) ) return NULL; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
