# HG changeset patch # User rbultje # Date 1262904243 0 # Node ID 4ec7bcff8719301fd91a082434c85d81af920657 # Parent da007db2fe9ce5944bbe7bee3b9b84d3162fb8e6 Add correct log context to av_log() calls in parse_rtpmap(). diff -r da007db2fe9c -r 4ec7bcff8719 rtsp.c --- a/rtsp.c Thu Jan 07 22:41:14 2010 +0000 +++ b/rtsp.c Thu Jan 07 22:44:03 2010 +0000 @@ -92,7 +92,8 @@ } /* parse the rtpmap description: /[/] */ -static int sdp_parse_rtpmap(AVCodecContext *codec, RTSPStream *rtsp_st, +static int sdp_parse_rtpmap(AVFormatContext *s, + AVCodecContext *codec, RTSPStream *rtsp_st, int payload_type, const char *p) { char buf[256]; @@ -134,7 +135,7 @@ i = atoi(buf); switch (codec->codec_type) { case CODEC_TYPE_AUDIO: - av_log(codec, AV_LOG_DEBUG, "audio codec set to: %s\n", c_name); + av_log(s, AV_LOG_DEBUG, "audio codec set to: %s\n", c_name); codec->sample_rate = RTSP_DEFAULT_AUDIO_SAMPLERATE; codec->channels = RTSP_DEFAULT_NB_AUDIO_CHANNELS; if (i > 0) { @@ -148,13 +149,13 @@ // the frequency. No problem, but the sample rate is being // set here by the sdp line. Patch on its way. (rdm) } - av_log(codec, AV_LOG_DEBUG, "audio samplerate set to: %i\n", + av_log(s, AV_LOG_DEBUG, "audio samplerate set to: %i\n", codec->sample_rate); - av_log(codec, AV_LOG_DEBUG, "audio channels set to: %i\n", + av_log(s, AV_LOG_DEBUG, "audio channels set to: %i\n", codec->channels); break; case CODEC_TYPE_VIDEO: - av_log(codec, AV_LOG_DEBUG, "video codec set to: %s\n", c_name); + av_log(s, AV_LOG_DEBUG, "video codec set to: %s\n", c_name); break; default: break; @@ -461,7 +462,7 @@ payload_type = atoi(buf1); st = s->streams[s->nb_streams - 1]; rtsp_st = st->priv_data; - sdp_parse_rtpmap(st->codec, rtsp_st, payload_type, p); + sdp_parse_rtpmap(s, st->codec, rtsp_st, payload_type, p); } else if (av_strstart(p, "fmtp:", &p)) { /* NOTE: fmtp is only supported AFTER the 'a=rtpmap:xxx' tag */ get_word(buf1, sizeof(buf1), &p);