Use PT_ values rather than raw numbers when checking for u-law and A-law
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 10 Oct 2003 10:16:03 +0000 (10:16 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 10 Oct 2003 10:16:03 +0000 (10:16 +0000)
payload.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8664 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/rtp_analysis.c

index d0dbad9a99d9bebda37ed099072113a08c47bd93..f6ec77315e0ea0670361c360ec18457e22bf1be4 100644 (file)
@@ -1,7 +1,7 @@
 /* rtp_analysis.c
  * RTP analysis addition for ethereal
  *
- * $Id: rtp_analysis.c,v 1.6 2003/10/03 22:38:56 guy Exp $
+ * $Id: rtp_analysis.c,v 1.7 2003/10/10 10:16:03 guy Exp $
  *
  * Copyright 2003, Alcatel Business Systems
  * By Lars Ruoff <lars.ruoff@gmx.net>
@@ -577,7 +577,7 @@ static int rtp_packet_save_payload(tap_rtp_save_info_t *saveinfo,
        }
 
        /* ulaw? */
-       if (rtpinfo->info_payload_type == 0) {
+       if (rtpinfo->info_payload_type == PT_PCMU) {
                /* we put the pointer at the beggining of the RTP data, that is
                * at the end of the current frame minus the length of the
                * padding count minus length of the RTP data */
@@ -593,7 +593,7 @@ static int rtp_packet_save_payload(tap_rtp_save_info_t *saveinfo,
        }
 
        /* alaw? */
-       else if (rtpinfo->info_payload_type == 8) {
+       else if (rtpinfo->info_payload_type == PT_PCMA) {
                data = cfile.pd + (pinfo->fd->pkt_len - rtpinfo->info_payload_len);
                for(i=0; i < (rtpinfo->info_payload_len - rtpinfo->info_padding_count); i++, data++) {
                        tmp = (gint16 )alaw2linear((unsigned char)*data);