mirror of https://git.ffmpeg.org/ffmpeg.git
The block_size might be used incorrectly if it is not updated.
Originally committed as revision 7607 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
5c1844ab56
commit
0f7af06674
|
@ -135,12 +135,12 @@ static int flashsv_decode_frame(AVCodecContext *avctx,
|
||||||
if(s->block_size < s->block_width*s->block_height) {
|
if(s->block_size < s->block_width*s->block_height) {
|
||||||
if (s->tmpblock != NULL)
|
if (s->tmpblock != NULL)
|
||||||
av_free(s->tmpblock);
|
av_free(s->tmpblock);
|
||||||
s->block_size = s->block_width*s->block_height;
|
if ((s->tmpblock = av_malloc(3*s->block_width*s->block_height)) == NULL) {
|
||||||
if ((s->tmpblock = av_malloc(3*s->block_size)) == NULL) {
|
|
||||||
av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n");
|
av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
s->block_size = s->block_width*s->block_height;
|
||||||
|
|
||||||
/* init the image size once */
|
/* init the image size once */
|
||||||
if((avctx->width==0) && (avctx->height==0)){
|
if((avctx->width==0) && (avctx->height==0)){
|
||||||
|
|
Loading…
Reference in New Issue