[FFmpeg-cvslog] r19567 - trunk/libavdevice/vfwcap.c

ramiro subversion
Sun Aug 2 19:39:11 CEST 2009


Author: ramiro
Date: Sun Aug  2 19:39:10 2009
New Revision: 19567

Log:
vfwcap: Move vfw_read_close to avoid forward declaration.
Patch by Diego.

Modified:
   trunk/libavdevice/vfwcap.c

Modified: trunk/libavdevice/vfwcap.c
==============================================================================
--- trunk/libavdevice/vfwcap.c	Sun Aug  2 17:10:03 2009	(r19566)
+++ trunk/libavdevice/vfwcap.c	Sun Aug  2 19:39:10 2009	(r19567)
@@ -201,7 +201,22 @@ fail:
     return FALSE;
 }
 
-static int vfw_read_close(AVFormatContext *s);
+static int vfw_read_close(AVFormatContext *s)
+{
+    struct vfw_ctx *ctx = s->priv_data;
+
+    if(ctx->hwnd) {
+        SendMessage(ctx->hwnd, WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, 0);
+        SendMessage(ctx->hwnd, WM_CAP_DRIVER_DISCONNECT, 0, 0);
+        DestroyWindow(ctx->hwnd);
+    }
+    if(ctx->mutex)
+        CloseHandle(ctx->mutex);
+    if(ctx->event)
+        CloseHandle(ctx->event);
+
+    return 0;
+}
 
 static int vfw_read_header(AVFormatContext *s, AVFormatParameters *ap)
 {
@@ -402,23 +417,6 @@ static int vfw_read_packet(AVFormatConte
     return pkt->size;
 }
 
-static int vfw_read_close(AVFormatContext *s)
-{
-    struct vfw_ctx *ctx = s->priv_data;
-
-    if(ctx->hwnd) {
-        SendMessage(ctx->hwnd, WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, 0);
-        SendMessage(ctx->hwnd, WM_CAP_DRIVER_DISCONNECT, 0, 0);
-        DestroyWindow(ctx->hwnd);
-    }
-    if(ctx->mutex)
-        CloseHandle(ctx->mutex);
-    if(ctx->event)
-        CloseHandle(ctx->event);
-
-    return 0;
-}
-
 AVInputFormat vfwcap_demuxer = {
     "vfwcap",
     NULL_IF_CONFIG_SMALL("VFW video capture"),



More information about the ffmpeg-cvslog mailing list