diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-07 13:00:47 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-07 13:00:47 +0200 |
commit | 91141f2a13bcb36b849335d1d10c01b596d773bb (patch) | |
tree | 4ac4c40f907ffa60664c89c19a9d774cb1ae9f66 /libavfilter/buffer.c | |
parent | 5891e454a667e42ef71a06bfd9661540ea3f3ebd (diff) | |
download | ffmpeg-91141f2a13bcb36b849335d1d10c01b596d773bb.tar.gz |
lavfi: add qp_table_size
This avoid recalculating it and in case w/h changed avoids crashes.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/buffer.c')
-rw-r--r-- | libavfilter/buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/buffer.c b/libavfilter/buffer.c index 470c6f148c..fc65b82825 100644 --- a/libavfilter/buffer.c +++ b/libavfilter/buffer.c @@ -42,7 +42,7 @@ void ff_avfilter_default_free_buffer(AVFilterBuffer *ptr) static void copy_video_props(AVFilterBufferRefVideoProps *dst, AVFilterBufferRefVideoProps *src) { *dst = *src; if (src->qp_table) { - int qsize = src->qp_table_linesize ? src->qp_table_linesize * ((src->h+15)/16) : (src->w+15)/16; + int qsize = src->qp_table_size; dst->qp_table = av_malloc(qsize); memcpy(dst->qp_table, src->qp_table, qsize); } |