From 80227f5e595ce09cb3a7958eaa9acde64abf7dc4 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 13 Jan 2012 16:16:38 +0000 Subject: [PATCH] dvbsubtitle:-fix for 1280x subtitel git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2057 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/2105867ec5466c2e0b3bcabb7d152e1c5aab71a2 Author: Jacek Jendrzej Date: 2012-01-13 (Fri, 13 Jan 2012) ------------------ This commit was generated by Migit --- lib/libdvbsub/dvbsubtitle.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/libdvbsub/dvbsubtitle.cpp b/lib/libdvbsub/dvbsubtitle.cpp index d1e760a7f..8bea202f9 100644 --- a/lib/libdvbsub/dvbsubtitle.cpp +++ b/lib/libdvbsub/dvbsubtitle.cpp @@ -121,16 +121,15 @@ void cDvbSubtitleBitmaps::Draw(int &min_x, int &min_y, int &max_x, int &max_y) int height = sub.rects[i]->h; int xoff, yoff; - int nw = (double) width * xc; + int nw = width == 1280 ? ((double) width / xc) : ((double) width * xc); int nh = (double) height * yc; int xdiff = (wd > xf) ? ((wd - xf) / 2) : 0; xoff = sub.rects[i]->x*xc + xstart + xdiff; - if(sub.rects[i]->y < 576/2) { yoff = ystart + sub.rects[i]->y*yc; } else { - yoff = yend - (576 - (double) (sub.rects[i]->y + height))*yc - nh; + yoff = yend - ((width == 1280 ? 704:576) - (double) (sub.rects[i]->y + height))*yc - nh; if(yoff < ystart) yoff = ystart; }