|
From: libvidcap c. m. <lib...@li...> - 2007-10-16 18:36:22
|
Revision: 48
http://libvidcap.svn.sourceforge.net/libvidcap/?rev=48&view=rev
Author: bcholew
Date: 2007-10-16 11:36:13 -0700 (Tue, 16 Oct 2007)
Log Message:
-----------
Handle failure to create new SourceStateMachine. Remove 'signed' modifier for stride.
Modified Paths:
--------------
trunk/src/conv.c
trunk/src/sapi.c
trunk/src/sapi.h
trunk/src/sapi_dshow.cpp
Modified: trunk/src/conv.c
===================================================================
--- trunk/src/conv.c 2007-10-12 18:09:35 UTC (rev 47)
+++ trunk/src/conv.c 2007-10-16 18:36:13 UTC (rev 48)
@@ -72,7 +72,7 @@
static const int conv_list_len = sizeof(conv_list) / sizeof(struct conv_info);
static int
-destride_packed(int image_byte_width, int height, signed int stride,
+destride_packed(int image_byte_width, int height, int stride,
const char * src, char * dst)
{
/* destride a packed structure */
@@ -100,7 +100,7 @@
destride_planar(int width, int height,
int u_width, int u_height,
int v_width, int v_height,
- signed int y_stride, signed int u_stride, signed int v_stride,
+ int y_stride, int u_stride, int v_stride,
const char * src, char * dst)
{
char * dst_y_even = dst;
Modified: trunk/src/sapi.c
===================================================================
--- trunk/src/sapi.c 2007-10-12 18:09:35 UTC (rev 47)
+++ trunk/src/sapi.c 2007-10-16 18:36:13 UTC (rev 48)
@@ -220,7 +220,7 @@
int
sapi_src_capture_notify(struct sapi_src_context * src_ctx,
const char * video_data, int video_data_size,
- signed int stride,
+ int stride,
int error_status)
{
struct vidcap_capture_info cap_info;
Modified: trunk/src/sapi.h
===================================================================
--- trunk/src/sapi.h 2007-10-12 18:09:35 UTC (rev 47)
+++ trunk/src/sapi.h 2007-10-16 18:36:13 UTC (rev 48)
@@ -47,7 +47,7 @@
int
sapi_src_capture_notify(struct sapi_src_context * src_ctx,
const char * video_data, int video_data_size,
- signed int stride,
+ int stride,
int error_status);
int
Modified: trunk/src/sapi_dshow.cpp
===================================================================
--- trunk/src/sapi_dshow.cpp 2007-10-12 18:09:35 UTC (rev 47)
+++ trunk/src/sapi_dshow.cpp 2007-10-16 18:36:13 UTC (rev 48)
@@ -177,6 +177,13 @@
return -1;
}
+ if ( src_ctx->priv == 0 )
+ {
+ log_warn("failed constructing source state machine for '%s'\n",
+ src_info->identifier);
+ return -1;
+ }
+
// Save acquired source to the dshow-specific source context
src_ctx->release = source_release;
src_ctx->format_validate = source_format_validate;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|