1.1 --- a/gmyth/src/gmyth_jobqueue.c Wed Mar 21 21:35:20 2007 +0000
1.2 +++ b/gmyth/src/gmyth_jobqueue.c Thu Mar 22 15:11:35 2007 +0000
1.3 @@ -82,18 +82,16 @@
1.4 gmyth_string_list_append_string (retlist, command);
1.5 gmyth_socket_write_stringlist (socket, retlist);
1.6
1.7 - g_string_free(command, TRUE);
1.8 -
1.9 // receive answer
1.10 gmyth_socket_read_stringlist (socket, retlist);
1.11 ret_str = gmyth_string_list_get_string(retlist, 0);
1.12
1.13 - ret = ret_str->str;
1.14 - g_string_free( ret_str, FALSE);
1.15 + //ret = ret_str->str;
1.16 + ret = g_string_free( ret_str, FALSE);
1.17 g_string_free (command, TRUE);
1.18 -
1.19 +
1.20 gmyth_string_list_clear_all (retlist);
1.21 - g_object_unref (retlist);
1.22 + g_object_unref (retlist);
1.23
1.24 return ret;
1.25 }
1.26 @@ -131,7 +129,7 @@
1.27 if (socket != NULL) {
1.28 GString* options = g_string_new ("");
1.29 gchar* ret;
1.30 -
1.31 +
1.32 if (g_ascii_strcasecmp(job, "JOB_TRANSCODE") == 0)
1.33 {
1.34 if (transcode->cutlist)
1.35 @@ -150,8 +148,12 @@
1.36 gmyth_socket_close_connection (socket);
1.37
1.38 g_object_unref (socket);
1.39 +
1.40 g_string_free (options, TRUE);
1.41 - g_free (ret);
1.42 +
1.43 + if (ret)
1.44 + g_free (ret);
1.45 +
1.46 } else {
1.47 g_debug("JobQueue Connection Failed");
1.48 }
1.49 @@ -174,20 +176,20 @@
1.50 gboolean res;
1.51
1.52 if (socket != NULL) {
1.53 - GString* ret = send_command(socket, action, job,
1.54 - transcode->chanid,
1.55 - transcode->starttime, "");
1.56 + gchar* ret = send_command(socket, action, job,
1.57 + transcode->chanid,
1.58 + transcode->starttime, "");
1.59
1.60 - res = test_result(ret->str, "JOBQUEUE_CHANGED_CMD_OK");
1.61 + res = test_result(ret, "JOBQUEUE_CHANGED_CMD_OK");
1.62
1.63 gmyth_socket_close_connection (socket);
1.64 g_object_unref (socket);
1.65
1.66 - g_string_free(ret, TRUE);
1.67 + g_free(ret);
1.68
1.69 } else {
1.70 g_debug("JobQueue Connection Failed");
1.71 }
1.72 -
1.73 +
1.74 return res;
1.75 }
2.1 --- a/gmyth/tests/gmyth_test_transcode.c Wed Mar 21 21:35:20 2007 +0000
2.2 +++ b/gmyth/tests/gmyth_test_transcode.c Thu Mar 22 15:11:35 2007 +0000
2.3 @@ -23,9 +23,9 @@
2.4 transcode->backend_info = backend_info;
2.5 transcode->cutlist = TRUE;
2.6
2.7 - gmyth_transcoder_set_output (transcode, TRUE, "/tmp/teste.mp4");
2.8 - gmyth_transcoder_set_filename (transcode, "1000_20061207123000.nuv");
2.9 - //gmyth_transcoder_set_filename (transcode, "1000_20061213130000.nuv");
2.10 + //gmyth_transcoder_set_output (transcode, TRUE, "/tmp/teste.mp4");
2.11 + gmyth_transcoder_set_filename (transcode, "1000_20070309160500.nuv");
2.12 + //gmyth_transcoder_set_filename (transcode, "1000_20070319170000.nuv");
2.13 int teste = gmyth_jobqueue_add_job(transcode, "JOB_TRANSCODE");
2.14
2.15 teste = gmyth_jobqueue_change_cmd(transcode, "STOP", "JOB_TRANSCODE");