Idefisk
Tools
Tutorials
Reviews
VoIP Providers
Archives
AsteriskGuru Archives
Mailing List Archives
FAQ
Search
Memberlist
Usergroups
Register
Profile
Log in to check your private messages
Log in
[Asterisk-cvs] asterisk frame.c,1.6,1.7
AsteriskGuru Archives Forum Index
->
Asterisk-CVS
View previous topic
::
View next topic
Author
Message
markster at lists.digium.
Guest
Posted: Fri Sep 26, 2003 11:16 pm
Post subject: [Asterisk-cvs] asterisk frame.c,1.6,1.7
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv18098
Modified Files:
frame.c
Log Message:
Show codec enhancements (bug #307)
Index: frame.c
===================================================================
RCS file: /usr/cvsroot/asterisk/frame.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- frame.c 16 Aug 2003 14:48:05 -0000 1.6
+++ frame.c 26 Sep 2003 23:17:33 -0000 1.7
@@ -441,7 +441,10 @@
"undefined", /* 23 */
"Maximum video format", /* 24 */
};
- return codecs[codec];
+ if ((codec >= 0) && (codec <= 24))
+ return codecs[codec];
+ else
+ return "unknown";
}
static int show_codecs(int fd, int argc, char *argv[])
@@ -454,19 +457,19 @@
if ((argc == 2) || (!strcasecmp(argv[1],"audio"))) {
found = 1;
for (i=0;i<11;i++)
- ast_cli(fd, "%8d (1 << %2d) %s\n",1 << i,i,ast_codec2str(i));
+ ast_cli(fd, "%11u (1 << %2d) %s\n",1 << i,i,ast_codec2str(i));
}
if ((argc == 2) || (!strcasecmp(argv[1],"image"))) {
found = 1;
for (i=16;i<18;i++)
- ast_cli(fd, "%8d (1 << %2d) %s\n",1 << i,i,ast_codec2str(i));
+ ast_cli(fd, "%11u (1 << %2d) %s\n",1 << i,i,ast_codec2str(i));
}
if ((argc == 2) || (!strcasecmp(argv[1],"video"))) {
found = 1;
for (i=18;i<20;i++)
- ast_cli(fd, "%8d (1 << %2d) %s\n",1 << i,i,ast_codec2str(i));
+ ast_cli(fd, "%11u (1 << %2d) %s\n",1 << i,i,ast_codec2str(i));
}
if (! found)
@@ -499,9 +502,9 @@
return RESULT_SHOWUSAGE;
for (i=0;i<32;i++)
- if (codec == (1 << i)) {
+ if (codec & (1 << i)) {
found = 1;
- ast_cli(fd, "%d (1 << %d) %s\n",1 << i,i,ast_codec2str(i));
+ ast_cli(fd, "%11u (1 << %2d) %s\n",1 << i,i,ast_codec2str(i));
}
if (! found)
Back to top
Display posts from previous:
All Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year
Oldest First
Newest First
AsteriskGuru Archives Forum Index
->
Asterisk-CVS
All times are GMT
Page
1
of
1
Jump to:
Select a forum
Asterisk Mailing Lists
----------------
Asterisk-Users
Asterisk-Dev
Asterisk-CVS
Asterisk-Biz
Asterisk-Doc
Asterisk-BSD
Asterisk-Announce
Asterisk Call Centers
Asterisk-Video
Asterisk-Speech-Rec
Bristuff-Users
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
edit your posts in this forum
You
cannot
delete your posts in this forum
You
cannot
vote in polls in this forum
Powered by
phpBB
© 2001, 2005 phpBB Group