summaryrefslogtreecommitdiff
path: root/libavfilter/vf_pad.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-03-18 08:51:55 +0100
committerClément Bœsch <ubitux@gmail.com>2013-03-18 08:51:55 +0100
commitc10b57973dff915bf2d892b22c13a52a834854bd (patch)
tree61f501bb52ee6439fbcae98548546a1e4c58f76f /libavfilter/vf_pad.c
parentfbd3ee91a59f4235d0038d469ef31ae3f37b8c7e (diff)
downloadffmpeg-c10b57973dff915bf2d892b22c13a52a834854bd.tar.gz
lavfi/pad: fix horizontal/vertical shift confusion.
Diffstat (limited to 'libavfilter/vf_pad.c')
-rw-r--r--libavfilter/vf_pad.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c
index 3f4a4f0dfa..4e1e3b0703 100644
--- a/libavfilter/vf_pad.c
+++ b/libavfilter/vf_pad.c
@@ -282,7 +282,7 @@ static int buffer_needs_copy(PadContext *s, AVFrame *frame, AVBufferRef *buf)
int vsub = s->draw.vsub[planes[i]];
uint8_t *start = frame->data[planes[i]];
- uint8_t *end = start + (frame->height >> hsub) *
+ uint8_t *end = start + (frame->height >> vsub) *
frame->linesize[planes[i]];
/* amount of free space needed before the start and after the end
@@ -301,9 +301,9 @@ static int buffer_needs_copy(PadContext *s, AVFrame *frame, AVBufferRef *buf)
#define SIGN(x) ((x) > 0 ? 1 : -1)
for (j = 0; j < FF_ARRAY_ELEMS(planes) && planes[j] >= 0; j++) {
- int hsub1 = s->draw.hsub[planes[j]];
+ int vsub1 = s->draw.vsub[planes[j]];
uint8_t *start1 = frame->data[planes[j]];
- uint8_t *end1 = start1 + (frame->height >> hsub1) *
+ uint8_t *end1 = start1 + (frame->height >> vsub1) *
frame->linesize[planes[j]];
if (i == j)
continue;