History

lavfi: add qp_table_size

This avoid recalculating it and in case w/h changed avoids crashes.

Michael Niedermayer committed 14 years ago

Commit 91141f21 parent 5891e453 files · +3 −1Browse files

Showing the changes to libavfilter/buffer.c (1 of 3 files). Show all

Unified · Split

libavfilter/buffer.c+1−1
@@ -42,7 +42,7 @@ void ff_avfilter_default_free_buffer(AVFilterBuffer *ptr) · 41 unmodified lines
42static void copy_video_props(AVFilterBufferRefVideoProps *dst, AVFilterBufferRefVideoProps *src) {42static void copy_video_props(AVFilterBufferRefVideoProps *dst, AVFilterBufferRefVideoProps *src) {
43 *dst = *src;43 *dst = *src;
44 if (src->qp_table) {44 if (src->qp_table) {
45 int qsize = src->qp_table_linesize ? src->qp_table_linesize * ((src->h+15)/16) : (src->w+15)/16;45 int qsize = src->qp_table_size;
46 dst->qp_table = av_malloc(qsize);46 dst->qp_table = av_malloc(qsize);
47 memcpy(dst->qp_table, src->qp_table, qsize);47 memcpy(dst->qp_table, src->qp_table, qsize);
48 }48 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t