summaryrefslogtreecommitdiff
path: root/src/input/input_dvb.c
diff options
context:
space:
mode:
authorFrantišek Dvořák <valtri@users.sourceforge.net>2005-08-25 15:36:29 +0000
committerFrantišek Dvořák <valtri@users.sourceforge.net>2005-08-25 15:36:29 +0000
commitf45651f26bc3aa1b312d282c5d8c4b04be0c2505 (patch)
tree7ff95ed1ee104e776559c7885539e1ff7a39fe97 /src/input/input_dvb.c
parent21c4975cc49bbbeac0067aa0847b3604ea639676 (diff)
downloadxine-lib-f45651f26bc3aa1b312d282c5d8c4b04be0c2505.tar.gz
xine-lib-f45651f26bc3aa1b312d282c5d8c4b04be0c2505.tar.bz2
*BUGFIX*
Windows ports fixes and improvements due to my current work on toxine: - first experiments with external win32 pthreads, more portable code (pthread_t may be a struct) - headers refactored - moved dirent win32 replacement to lib/, hide it for frontends, used system version, if found, not used non-POSIX dirent->d_reclen (this item doesn't work in MinGW), fix memleak in dvb - separated settings for postproc and avcodec when using external ffmpeg - check for malloc.h in public xine.m4, used it conditionally in xine headers - replaced random() by POSIX more common rand() - prevent one segfault in directx vo plugin, if fails - M$VC port update CVS patchset: 7709 CVS date: 2005/08/25 15:36:29
Diffstat (limited to 'src/input/input_dvb.c')
-rw-r--r--src/input/input_dvb.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c
index 7f45d3ab8..f76207671 100644
--- a/src/input/input_dvb.c
+++ b/src/input/input_dvb.c
@@ -88,7 +88,9 @@
#endif
#include <sys/poll.h>
#include <time.h>
+#ifdef HAVE_DIRENT_H
#include <dirent.h>
+#endif
#include <ctype.h>
/* These will eventually be #include <linux/dvb/...> */
@@ -2098,6 +2100,8 @@ static void do_record (dvb_input_plugin_t *this) {
char dates[64];
int x=0;
xine_cfg_entry_t savedir;
+ DIR *dir;
+
if (this->record_fd > -1) {
/* stop recording */
@@ -2120,10 +2124,11 @@ static void do_record (dvb_input_plugin_t *this) {
if (xine_config_lookup_entry(this->stream->xine, "media.capture.save_dir", &savedir)){
if(strlen(savedir.str_value)>1){
- if(opendir(savedir.str_value)==NULL){
+ if((dir = opendir(savedir.str_value))==NULL){
snprintf (filename, 256, "%s/%s_%s.ts",xine_get_homedir(),this->channels[this->channel].name, dates);
xprintf(this->class->xine,XINE_VERBOSITY_LOG,"savedir is wrong... saving to home directory\n");
} else {
+ closedir(dir);
snprintf (filename, 256, "%s/%s_%s.ts",savedir.str_value,this->channels[this->channel].name, dates);
xprintf(this->class->xine,XINE_VERBOSITY_LOG,"saving to savedir\n");
}