summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-08-15 17:28:16 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-08-15 17:41:48 +0200
commitbd5d11d9f5fdfb5d639a182a97b84ae08af16fc0 (patch)
treefb87420b269ef49cca5fa830571b9929659b2acc /ffmpeg.c
parent0ac83047f67bb56406c66d4ca664d3c0cb07c2f2 (diff)
downloadffmpeg-bd5d11d9f5fdfb5d639a182a97b84ae08af16fc0.tar.gz
ffmpeg: Use actual frame dimensions in checks in sub2video_update()
Fixes Ticket4744 part2 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 9143e7bd7d..fd59c3c6e3 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -227,7 +227,6 @@ static void sub2video_push_ref(InputStream *ist, int64_t pts)
static void sub2video_update(InputStream *ist, AVSubtitle *sub)
{
- int w = ist->sub2video.w, h = ist->sub2video.h;
AVFrame *frame = ist->sub2video.frame;
int8_t *dst;
int dst_linesize;
@@ -255,7 +254,7 @@ static void sub2video_update(InputStream *ist, AVSubtitle *sub)
dst = frame->data [0];
dst_linesize = frame->linesize[0];
for (i = 0; i < num_rects; i++)
- sub2video_copy_rect(dst, dst_linesize, w, h, sub->rects[i]);
+ sub2video_copy_rect(dst, dst_linesize, frame->width, frame->height, sub->rects[i]);
sub2video_push_ref(ist, pts);
ist->sub2video.end_pts = end_pts;
}