diff options
author | John Stebbins <[email protected]> | 2015-09-04 08:40:43 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2015-09-24 09:28:28 -0700 |
commit | 78182d366b6f1981bd4300192dc174dd2123f4f5 (patch) | |
tree | a64e241a2a597635ca8a6c1a4344e0c6f447fd98 /libhb/decvobsub.c | |
parent | 8e38bee64ad60e7e5e53b0b1a4af1b4b4beeb05a (diff) |
rendersub: handle mismatched video and subtitle dimensions
The video frame subtitles are meant to be rendered to may not match the
actual video we are encoding. So scale to match as needed.
Diffstat (limited to 'libhb/decvobsub.c')
-rw-r--r-- | libhb/decvobsub.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libhb/decvobsub.c b/libhb/decvobsub.c index fa247ab28..c4dfc3761 100644 --- a/libhb/decvobsub.c +++ b/libhb/decvobsub.c @@ -541,10 +541,11 @@ static hb_buffer_t * CropSubtitle( hb_work_object_t * w, uint8_t * raw ) buf->s.frametype = HB_FRAME_SUBTITLE; buf->s.start = pv->pts_start; buf->s.stop = pv->pts_stop; - buf->s.type = SUBTITLE_BUF; buf->f.x = pv->x + crop[2]; buf->f.y = pv->y + crop[0]; + buf->f.window_width = w->subtitle->width; + buf->f.window_height = w->subtitle->height; lum_in = raw + crop[0] * pv->width + crop[2]; alpha_in = lum_in + pv->width * pv->height; |