]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
frsh: Print error messages
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 21 May 2010 09:13:52 +0000 (11:13 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 21 May 2010 09:13:52 +0000 (11:13 +0200)
libavformat/frsh.c

index 5644db2831b6934948f4e6233478d2b38bcad09e..b1616160477dfe5b8de723ba244bedaac10396c5 100644 (file)
@@ -74,6 +74,13 @@ static int is_multicast_address(struct sockaddr_in *addr)
     return 0;
 }
 
+static void print_error(int err, char *str)
+{
+    char error_string[1024];
+    frsh_strerror(err , error_string, sizeof(error_string));
+    av_log(NULL, AV_LOG_ERROR, "%s: error %d: %s\n", str, err, error_string);
+}
+
 static int 
 frsh_output_socket_create(FRSHContext *s)
 {
@@ -125,7 +132,7 @@ frsh_output_socket_create(FRSHContext *s)
        }
 
        ret = frsh_contract_negotiate(&s->contract, &s->vres);
-       //if (ret) PERROR_AND_EXIT(ret, "frsh_contract_negotiate");
+       if (ret) print_error(ret, "frsh_contract_negotiate");
        if (ret) return -1;
        
        printf("Send endpoint created\n");