aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2007-08-09 18:52:49 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2007-08-09 18:52:49 +0000
commit0a8cd696076efc00ce26f8a43788d7d59d407b32 (patch)
treeabc30673e82c40547dd964aea3f0e0a2738dcde7 /ffplay.c
parentf13ea4e00c583d819f279a455d3f0a02e40ef0ae (diff)
downloadffmpeg-0a8cd696076efc00ce26f8a43788d7d59d407b32.tar.gz
Revert r10021, it was committed by accident and is a bit ugly anyway.
Originally committed as revision 10026 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/ffplay.c b/ffplay.c
index 8b631c37df..ad81e3a093 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -422,8 +422,7 @@ void fill_border(VideoState *s, int x, int y, int w, int h, int color)
#define BPP 1
-static void blend_subrect(AVPicture *dst, const AVSubtitleRect *rect, int imgw, int imgh,
- float scalex, float scaley)
+static void blend_subrect(AVPicture *dst, const AVSubtitleRect *rect, int imgw, int imgh)
{
int wrap, wrap3, width2, skip2;
int y, u, v, a, u1, v1, a1, w, h;
@@ -432,9 +431,9 @@ static void blend_subrect(AVPicture *dst, const AVSubtitleRect *rect, int imgw,
const uint32_t *pal;
int dstx, dsty, dstw, dsth;
- dstx = FFMIN(scalex * FFMAX(rect->x, 0), imgw);
+ dstx = FFMIN(FFMAX(rect->x, 0), imgw);
dstw = FFMIN(FFMAX(rect->w, 0), imgw - dstx);
- dsty = FFMIN(scaley * FFMAX(rect->y, 0), imgh);
+ dsty = FFMIN(FFMAX(rect->y, 0), imgh);
dsth = FFMIN(FFMAX(rect->h, 0), imgh - dsty);
lum = dst->data[0] + dsty * dst->linesize[0];
cb = dst->data[1] + (dsty >> 1) * dst->linesize[1];
@@ -700,7 +699,6 @@ static void video_image_display(VideoState *is)
if (vp->pts >= sp->pts + ((float) sp->sub.start_display_time / 1000))
{
- float scalex = 1, scaley = 1;
SDL_LockYUVOverlay (vp->bmp);
pict.data[0] = vp->bmp->pixels[0];
@@ -711,14 +709,9 @@ static void video_image_display(VideoState *is)
pict.linesize[1] = vp->bmp->pitches[2];
pict.linesize[2] = vp->bmp->pitches[1];
- if (is->subtitle_st->codec->width)
- scalex = (float)vp->bmp->w / is->subtitle_st->codec->width;
- if (is->subtitle_st->codec->height)
- scaley = (float)vp->bmp->h / is->subtitle_st->codec->height;
for (i = 0; i < sp->sub.num_rects; i++)
blend_subrect(&pict, &sp->sub.rects[i],
- vp->bmp->w, vp->bmp->h,
- scalex, scaley);
+ vp->bmp->w, vp->bmp->h);
SDL_UnlockYUVOverlay (vp->bmp);
}