[asterisk-commits] rizzo: branch rizzo/video_v2 r85095 - /team/rizzo/video_v2/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 9 09:45:55 CDT 2007


Author: rizzo
Date: Tue Oct  9 09:45:54 2007
New Revision: 85095

URL: http://svn.digium.com/view/asterisk?view=rev&rev=85095
Log:
set videoformat in the right place

Modified:
    team/rizzo/video_v2/channels/console_video.c

Modified: team/rizzo/video_v2/channels/console_video.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/video_v2/channels/console_video.c?view=diff&rev=85095&r1=85094&r2=85095
==============================================================================
--- team/rizzo/video_v2/channels/console_video.c (original)
+++ team/rizzo/video_v2/channels/console_video.c Tue Oct  9 09:45:54 2007
@@ -1056,10 +1056,13 @@
 
 	for (i = 0; str_format_map[i].name != NULL; i++)
 		if(strcasecmp(name, str_format_map[i].name) == 0)
-			return str_format_map[i].codec;
-	ast_log(LOG_WARNING, "Cannot find codec for '%s', using '%s'\n",
-		name, str_format_map[0].name);
-	strcpy(name, str_format_map[0].name);
+			break;
+	if (str_format_map[i].name == NULL) {
+		ast_log(LOG_WARNING, "Cannot find codec for '%s'\n", name);
+		i = 0;
+		strcpy(name, str_format_map[i].name);
+	}
+	ast_log(LOG_WARNING, "Using codec '%s'\n", name);
 	return str_format_map[i].codec;
 }
 
@@ -1776,7 +1779,6 @@
 	const char *var, const char *val)
 {
 	struct video_desc *env;
-	char name[10];
 	M_START(var, val);
 
 	if (penv == NULL) {
@@ -1800,7 +1802,7 @@
         M_UINT("videoheight", env->h)
         M_UINT("fps", env->fps)
         M_UINT("bitrate", env->bitrate)
-	M_STR("videoformat", name)
+	M_STR("videoformat", env->codec_name)
 	M_END(return 1;)	/* the 'nothing found' case */
 	return 0;		/* found something */
 }




More information about the asterisk-commits mailing list