Browse code

Clean after toggling wave. Fixes issue1180.

Originally committed as revision 21632 to svn://svn.ffmpeg.org/ffmpeg/trunk

Michael Niedermayer authored on 2010/02/04 08:34:06
Showing 1 changed files
... ...
@@ -2306,7 +2306,12 @@ static void do_exit(void)
2306 2306
 static void toggle_audio_display(void)
2307 2307
 {
2308 2308
     if (cur_stream) {
2309
+        int bgcolor = SDL_MapRGB(screen->format, 0x00, 0x00, 0x00);
2309 2310
         cur_stream->show_audio = !cur_stream->show_audio;
2311
+        fill_rectangle(screen,
2312
+                    cur_stream->xleft, cur_stream->ytop, cur_stream->width, cur_stream->height,
2313
+                    bgcolor);
2314
+        SDL_UpdateRect(screen, cur_stream->xleft, cur_stream->ytop, cur_stream->width, cur_stream->height);
2310 2315
     }
2311 2316
 }
2312 2317