diff --git a/veejay-current/gveejay-reloaded/vj-api.c b/veejay-current/gveejay-reloaded/vj-api.c index f3ab5fbe..e9478a5e 100644 --- a/veejay-current/gveejay-reloaded/vj-api.c +++ b/veejay-current/gveejay-reloaded/vj-api.c @@ -6215,7 +6215,7 @@ void vj_fork_or_connect_veejay(char *configfile) { if( info->state == STATE_PLAYING ) { - vj_gui_disconnect( ); + vj_gui_disconnect( ); vj_msg(VEEJAY_MSG_ERROR, "Disconnected."); info->state = STATE_RECONNECT; } @@ -6862,6 +6862,7 @@ gboolean is_alive( void ) if(gui->watch.state == STATE_DISCONNECT ) { gui->watch.state = STATE_STOPPED; + gui->status_lock = 1; vj_gui_disconnect(); return TRUE; } @@ -6910,11 +6911,11 @@ gboolean is_alive( void ) void vj_gui_disconnect() { -// g_source_remove( info->logging ); -// g_source_remove( info->cpumeter ); -// g_source_remove( info->cachemeter ); - g_io_channel_shutdown(info->channel, FALSE, NULL); - g_io_channel_unref(info->channel); + if( info->channel ) + { + g_io_channel_shutdown( info->channel, FALSE, NULL ); + g_io_channel_unref(info->channel); + } gtk_key_snooper_remove( info->key_id ); free_samplebank(); diff --git a/veejay-current/libel/lav_io.c b/veejay-current/libel/lav_io.c index 8bb87f44..cabb7e81 100644 --- a/veejay-current/libel/lav_io.c +++ b/veejay-current/libel/lav_io.c @@ -466,7 +466,7 @@ lav_file_t *lav_open_output_file(char *filename, char format, int lav_close(lav_file_t *lav_file) { 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) { #ifdef SUPPORT_READ_DV2 @@ -1076,7 +1076,7 @@ int lav_read_frame(lav_file_t *lav_file, uint8_t *vidbuf) if(!kf) { veejay_msg(0, "Requested frame is not a keyframe"); - return 0; + return -1; } return ret; diff --git a/veejay-current/libel/vj-el.c b/veejay-current/libel/vj-el.c index 4e127c1a..79639948 100644 --- a/veejay-current/libel/vj-el.c +++ b/veejay-current/libel/vj-el.c @@ -481,10 +481,6 @@ static int _el_probe_for_pixel_fmt( lav_file_t *fd ) case FMT_422F: veejay_msg(VEEJAY_MSG_DEBUG,"\tPixel format: YUV Planar 4:2:2 [JPEG full range]"); break; - default: - veejay_msg(VEEJAY_MSG_DEBUG,"\tPixel format: %x (unknown)", new ); - break; - } return new; @@ -578,19 +574,13 @@ int open_video_file(char *filename, editlist * el, int preserve_pathname, int de chroma = el->MJPG_chroma; 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 ); - if (elfd == NULL) { veejay_msg(VEEJAY_MSG_ERROR,"Error loading videofile '%s'", realname); veejay_msg(VEEJAY_MSG_ERROR,"%s",lav_strerror()); if(realname) free(realname); - lav_close(elfd); return -1; }