[Mplayer-cvslog] CVS: main/libmpdemux tv.c,1.6,1.7 tv.h,1.4,1.5 tvi_def.h,1.2,1.3 tvi_v4l.c,1.5,1.6
Alex Beregszaszi
alex at mplayer.dev.hu
Sun Nov 11 04:53:44 CET 2001
Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv14817
Modified Files:
tv.c tv.h tvi_def.h tvi_v4l.c
Log Message:
cleaned up some warnings, and tv_param_on moved out from #ifdef USE_TV
Index: tv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tv.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- tv.c 11 Nov 2001 03:40:16 -0000 1.6
+++ tv.c 11 Nov 2001 03:53:42 -0000 1.7
@@ -12,6 +12,8 @@
#include "config.h"
+int tv_param_on = 0;
+
#ifdef USE_TV
#include "mp_msg.h"
#include "help_mp.h"
@@ -25,7 +27,6 @@
unsigned long tv_param_freq = 0;
char *tv_param_channel = "0";
char *tv_param_norm = "pal";
-int tv_param_on = 0;
char *tv_param_device = NULL;
char *tv_param_driver = "dummy";
int tv_param_width = -1;
Index: tv.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tv.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- tv.h 11 Nov 2001 03:40:16 -0000 1.4
+++ tv.h 11 Nov 2001 03:53:42 -0000 1.5
@@ -1,5 +1,7 @@
#include "config.h"
+extern int tv_param_on;
+
#ifdef USE_TV
#include "../libao2/afmt.h"
#include "../libvo/img_format.h"
@@ -9,7 +11,6 @@
extern unsigned long tv_param_freq;
extern char *tv_param_channel;
extern char *tv_param_norm;
-extern int tv_param_on;
extern char *tv_param_device;
extern char *tv_param_driver;
extern int tv_param_width;
Index: tvi_def.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tvi_def.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- tvi_def.h 10 Nov 2001 23:31:08 -0000 1.2
+++ tvi_def.h 11 Nov 2001 03:53:42 -0000 1.3
@@ -21,7 +21,7 @@
static tvi_handle_t *new_handle()
{
- tvi_handle_t *h = malloc(sizeof(tvi_handle_t));
+ tvi_handle_t *h = (tvi_handle_t *)malloc(sizeof(tvi_handle_t));
if (!h)
return(NULL);
Index: tvi_v4l.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tvi_v4l.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- tvi_v4l.c 11 Nov 2001 03:40:16 -0000 1.5
+++ tvi_v4l.c 11 Nov 2001 03:53:42 -0000 1.6
@@ -206,12 +206,12 @@
/* set video device name */
if (!device)
{
- priv->video_device = malloc(strlen("/dev/video0"));
+ priv->video_device = (char *)malloc(strlen("/dev/video0"));
sprintf(priv->video_device, "/dev/video0");
}
else
{
- priv->video_device = malloc(strlen(device));
+ priv->video_device = (char *)malloc(strlen(device));
strcpy(priv->video_device, device);
}
@@ -265,7 +265,7 @@
priv->height = priv->capability.minheight;
mp_msg(MSGT_TV, MSGL_INFO, " Inputs: %d\n", priv->capability.channels);
- priv->channels = malloc(sizeof(struct video_channel)*priv->capability.channels);
+ priv->channels = (struct video_channel *)malloc(sizeof(struct video_channel)*priv->capability.channels);
memset(priv->channels, 0, sizeof(struct video_channel)*priv->capability.channels);
for (i = 0; i < priv->capability.channels; i++)
{
@@ -298,7 +298,7 @@
priv->mbuf.size, priv->mbuf.frames);
priv->mmap = mmap(0, priv->mbuf.size, PROT_READ|PROT_WRITE,
MAP_SHARED, priv->fd, 0);
- if (priv->mmap == -1)
+ if (priv->mmap == (unsigned char *)-1)
{
mp_msg(MSGT_TV, MSGL_ERR, "Unabel to map memory for buffers: %s\n", strerror(errno));
goto err;
@@ -309,7 +309,7 @@
priv->nbuf = priv->mbuf.frames;
/* video buffers */
- priv->buf = malloc(priv->nbuf * sizeof(struct video_mmap));
+ priv->buf = (struct video_mmap *)malloc(priv->nbuf * sizeof(struct video_mmap));
memset(priv->buf, 0, priv->nbuf * sizeof(struct video_mmap));
return(1);
More information about the MPlayer-cvslog
mailing list