summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-05-27 01:47:34 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-05-27 02:53:21 +0200
commit027264cb82134c83413810810b24340f6290e11a (patch)
tree11009209889b89443c2194dda88ef1ed7c4976ec /ffplay.c
parent701012d676042608cd6ec3317c1936a246f436d7 (diff)
parentca7d8256e32e4dbafadc54a65b441945ac759ca9 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits) ARM: add ARMv6 optimised av_clip_uintp2 ARM: remove volatile from asm statements in libavutil/intmath ARM: fix av_clipl_int32_arm() v4l: include avdevice.h ffserver: move close_connection() call to avoid a temporary string and copy. lavf: initialize demuxer private options. AVOptions: set string default values. lavdevice: mark v4l for removal on next major bump. swscale: fix compile on ppc. swscale: fix compile on x86-32. build: Remove generated .version file on distclean. configure: Add -D_GNU_SOURCE to CPPFLAGS on OS/2. doc: Drop hint at --enable-memalign-hack for MinGW, it is now autodetected. ffplay: Remove disabled code. Mark parameterless function declarations as 'void'. swscale: use av_clip_uint8() in yuv2yuv1_c(). swscale: remove VOF/VOFW. swscale: split chroma buffers into separate U/V planes. swscale: replace formatConvBuffer[VOF] by allocated array. rgb2rgb: remove duplicate mmx/mmx2/3dnow/sse2 functions. ... Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c62
1 files changed, 1 insertions, 61 deletions
diff --git a/ffplay.c b/ffplay.c
index 28c0c8ec3f..e2e097a403 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -406,44 +406,6 @@ static inline void fill_rectangle(SDL_Surface *screen,
SDL_FillRect(screen, &rect, color);
}
-#if 0
-/* draw only the border of a rectangle */
-void fill_border(VideoState *s, int x, int y, int w, int h, int color)
-{
- int w1, w2, h1, h2;
-
- /* fill the background */
- w1 = x;
- if (w1 < 0)
- w1 = 0;
- w2 = s->width - (x + w);
- if (w2 < 0)
- w2 = 0;
- h1 = y;
- if (h1 < 0)
- h1 = 0;
- h2 = s->height - (y + h);
- if (h2 < 0)
- h2 = 0;
- fill_rectangle(screen,
- s->xleft, s->ytop,
- w1, s->height,
- color);
- fill_rectangle(screen,
- s->xleft + s->width - w2, s->ytop,
- w2, s->height,
- color);
- fill_rectangle(screen,
- s->xleft + w1, s->ytop,
- s->width - w1 - w2, h1,
- color);
- fill_rectangle(screen,
- s->xleft + w1, s->ytop + s->height - h2,
- s->width - w1 - w2, h2,
- color);
-}
-#endif
-
#define ALPHA_BLEND(a, oldp, newp, s)\
((((oldp << s) * (255 - (a))) + (newp * (a))) / (255 << s))
@@ -743,23 +705,12 @@ static void video_image_display(VideoState *is)
}
x = (is->width - width) / 2;
y = (is->height - height) / 2;
- if (!is->no_background) {
- /* fill the background */
- // fill_border(is, x, y, width, height, QERGB(0x00, 0x00, 0x00));
- } else {
- is->no_background = 0;
- }
+ is->no_background = 0;
rect.x = is->xleft + x;
rect.y = is->ytop + y;
rect.w = FFMAX(width, 1);
rect.h = FFMAX(height, 1);
SDL_DisplayYUVOverlay(vp->bmp, &rect);
- } else {
-#if 0
- fill_rectangle(screen,
- is->xleft, is->ytop, is->width, is->height,
- QERGB(0x00, 0x00, 0x00));
-#endif
}
}
@@ -1899,8 +1850,6 @@ static int subtitle_thread(void *arg)
len1 = avcodec_decode_subtitle2(is->subtitle_st->codec,
&sp->sub, &got_subtitle,
pkt);
-// if (len1 < 0)
-// break;
if (got_subtitle && sp->sub.format == 0) {
sp->pts = pts;
@@ -1924,9 +1873,6 @@ static int subtitle_thread(void *arg)
SDL_UnlockMutex(is->subpq_mutex);
}
av_free_packet(pkt);
-// if (step)
-// if (cur_stream)
-// stream_toggle_pause(cur_stream);
}
the_end:
return 0;
@@ -2254,8 +2200,6 @@ static int stream_component_open(VideoState *is, int stream_index)
is->video_stream = stream_index;
is->video_st = ic->streams[stream_index];
-// is->video_current_pts_time = av_gettime();
-
packet_queue_init(&is->videoq);
is->video_tid = SDL_CreateThread(video_thread, is);
break;
@@ -2694,10 +2638,6 @@ static void stream_cycle_channel(VideoState *is, int codec_type)
static void toggle_full_screen(void)
{
is_full_screen = !is_full_screen;
- if (!fs_screen_width) {
- /* use default SDL method */
-// SDL_WM_ToggleFullScreen(screen);
- }
video_open(cur_stream);
}