fix bug on close file, fix bug in reconnect (ui)

git-svn-id: svn://code.dyne.org/veejay/trunk@759 eb8d1916-c9e9-0310-b8de-cf0c9472ead5
This commit is contained in:
Niels Elburg
2007-02-04 11:40:33 +00:00
parent c80d376390
commit c8a6f2e48e
3 changed files with 9 additions and 18 deletions

View File

@@ -6862,6 +6862,7 @@ gboolean is_alive( void )
if(gui->watch.state == STATE_DISCONNECT ) if(gui->watch.state == STATE_DISCONNECT )
{ {
gui->watch.state = STATE_STOPPED; gui->watch.state = STATE_STOPPED;
gui->status_lock = 1;
vj_gui_disconnect(); vj_gui_disconnect();
return TRUE; return TRUE;
} }
@@ -6910,11 +6911,11 @@ gboolean is_alive( void )
void vj_gui_disconnect() void vj_gui_disconnect()
{ {
// g_source_remove( info->logging ); if( info->channel )
// g_source_remove( info->cpumeter ); {
// g_source_remove( info->cachemeter ); g_io_channel_shutdown( info->channel, FALSE, NULL );
g_io_channel_shutdown(info->channel, FALSE, NULL); g_io_channel_unref(info->channel);
g_io_channel_unref(info->channel); }
gtk_key_snooper_remove( info->key_id ); gtk_key_snooper_remove( info->key_id );
free_samplebank(); free_samplebank();

View File

@@ -466,7 +466,7 @@ lav_file_t *lav_open_output_file(char *filename, char format,
int lav_close(lav_file_t *lav_file) int lav_close(lav_file_t *lav_file)
{ {
int ret = 0; int ret = 0;
video_format = lav_file->format; internal_error = 0; /* for error messages */ video_format = lav_file->format; internal_error = 0; /* for error messages */
switch(video_format) switch(video_format)
{ {
#ifdef SUPPORT_READ_DV2 #ifdef SUPPORT_READ_DV2
@@ -1076,7 +1076,7 @@ int lav_read_frame(lav_file_t *lav_file, uint8_t *vidbuf)
if(!kf) if(!kf)
{ {
veejay_msg(0, "Requested frame is not a keyframe"); veejay_msg(0, "Requested frame is not a keyframe");
return 0; return -1;
} }
return ret; return ret;

View File

@@ -481,10 +481,6 @@ static int _el_probe_for_pixel_fmt( lav_file_t *fd )
case FMT_422F: case FMT_422F:
veejay_msg(VEEJAY_MSG_DEBUG,"\tPixel format: YUV Planar 4:2:2 [JPEG full range]"); veejay_msg(VEEJAY_MSG_DEBUG,"\tPixel format: YUV Planar 4:2:2 [JPEG full range]");
break; break;
default:
veejay_msg(VEEJAY_MSG_DEBUG,"\tPixel format: %x (unknown)", new );
break;
} }
return new; return new;
@@ -578,19 +574,13 @@ int open_video_file(char *filename, editlist * el, int preserve_pathname, int de
chroma = el->MJPG_chroma; chroma = el->MJPG_chroma;
n = el->num_video_files; n = el->num_video_files;
//el->num_video_files++;
//el->lav_fd[n] = elfd;
lav_file_t *elfd = lav_open_input_file(filename,mmap_size ); lav_file_t *elfd = lav_open_input_file(filename,mmap_size );
if (elfd == NULL) if (elfd == NULL)
{ {
veejay_msg(VEEJAY_MSG_ERROR,"Error loading videofile '%s'", realname); veejay_msg(VEEJAY_MSG_ERROR,"Error loading videofile '%s'", realname);
veejay_msg(VEEJAY_MSG_ERROR,"%s",lav_strerror()); veejay_msg(VEEJAY_MSG_ERROR,"%s",lav_strerror());
if(realname) free(realname); if(realname) free(realname);
lav_close(elfd);
return -1; return -1;
} }