Wireshark-dev: Re: [Wireshark-dev] RTP Stream Analyses and dynamic payload clock rates
From: Jaap Keuter <[email protected]>
Date: Sun, 16 Nov 2008 18:01:39 +0100

You may have a point there. Would you open a bug for that in the Wireshark bug database (https://bugs.wireshark.org)? That way it won't be forgotten.

Michael Lum wrote:

(Source is from 1.0.4)

I was looking through tap-rtp-common.c because I wanted
to add some CODECs when I noticed what I think is a bug.

In this function:

static guint32
get_dyn_pt_clock_rate(gchar *payload_type_str)
    size_t i;

    for (i = 0; i < NUM_DYN_CLOCK_VALUES; i++) {
type_str,(strlen(mimetype_and_clock_map[i].pt_mime_name_str))) == 0)
            return mimetype_and_clock_map[i].value;

    return 1;

Here's the first 2 entries in the array:

static const mimetype_and_clock mimetype_and_clock_map[] = {
        {"AMR",         8000},                  /* [RFC3267] */
        {"AMR-WB",      16000},                 /* [RFC3267] */

So if 'payload_type_str' is equal to 'AMR-WB' I believe the first match
will be 'AMR' and the
returned clock rate of 8000 will be incorrect.

Wouldn't my example be the equivalent to

	strncasecmp("AMR", "AMR-WB", 3)