[SCM] libav/experimental: cosmetic (move video_open() up to avoid prototype)

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:54:33 UTC 2013


The following commit has been merged in the experimental branch:
commit 990c84384fe6de769300cb999f36525f9fccd1d9
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Sun Dec 31 18:01:13 2006 +0000

    cosmetic (move video_open() up to avoid prototype)
    
    Originally committed as revision 7388 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/ffplay.c b/ffplay.c
index 58247c4..a97924e 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -829,7 +829,44 @@ static void video_audio_display(VideoState *s)
     SDL_UpdateRect(screen, s->xleft, s->ytop, s->width, s->height);
 }
 
-static int video_open(VideoState *is);
+static int video_open(VideoState *is){
+    int flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;
+    int w,h;
+
+    if (is_full_screen && fs_screen_width) {
+        w = fs_screen_width;
+        h = fs_screen_height;
+        flags |= SDL_FULLSCREEN;
+    } else {
+        if(screen_width){
+            w = screen_width;
+            h = screen_height;
+        }else if (is->video_st && is->video_st->codec->width){
+            w = is->video_st->codec->width;
+            h = is->video_st->codec->height;
+        } else {
+            w = 640;
+            h = 480;
+        }
+        flags |= SDL_RESIZABLE;
+    }
+#ifndef CONFIG_DARWIN
+    screen = SDL_SetVideoMode(w, h, 0, flags);
+#else
+    /* setting bits_per_pixel = 0 or 32 causes blank video on OS X */
+    screen = SDL_SetVideoMode(w, h, 24, flags);
+#endif
+    if (!screen) {
+        fprintf(stderr, "SDL: could not set video mode - exiting\n");
+        return -1;
+    }
+    SDL_WM_SetCaption("FFplay", "FFplay");
+
+    is->width = screen->w;
+    is->height = screen->h;
+
+    return 0;
+}
 
 /* display the current picture, if any */
 static void video_display(VideoState *is)
@@ -1599,45 +1636,6 @@ void sdl_audio_callback(void *opaque, Uint8 *stream, int len)
     }
 }
 
-static int video_open(VideoState *is){
-    int flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;
-    int w,h;
-
-    if (is_full_screen && fs_screen_width) {
-        w = fs_screen_width;
-        h = fs_screen_height;
-        flags |= SDL_FULLSCREEN;
-    } else {
-        if(screen_width){
-            w = screen_width;
-            h = screen_height;
-        }else if (is->video_st && is->video_st->codec->width){
-            w = is->video_st->codec->width;
-            h = is->video_st->codec->height;
-        } else {
-            w = 640;
-            h = 480;
-        }
-        flags |= SDL_RESIZABLE;
-    }
-#ifndef CONFIG_DARWIN
-    screen = SDL_SetVideoMode(w, h, 0, flags);
-#else
-    /* setting bits_per_pixel = 0 or 32 causes blank video on OS X */
-    screen = SDL_SetVideoMode(w, h, 24, flags);
-#endif
-    if (!screen) {
-        fprintf(stderr, "SDL: could not set video mode - exiting\n");
-        return -1;
-    }
-    SDL_WM_SetCaption("FFplay", "FFplay");
-
-    is->width = screen->w;
-    is->height = screen->h;
-
-    return 0;
-}
-
 /* open a given stream. Return 0 if OK */
 static int stream_component_open(VideoState *is, int stream_index)
 {

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list