diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-07-05 11:01:07 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-07-09 17:40:54 +0400 |
commit | 0307cc2253e76772b1c645ac6117d08da87a147c (patch) | |
tree | a888e60dee2ceb9b4abbe48ec4f13a70303d4015 /libavformat/rtpdec_amr.c | |
parent | 650d384048ed42579cc6d67bf32a94b468c0b6cb (diff) |
rtpdec: pass an AVFormatContext to ff_parse_fmtp()
Use it for logging, instead of NULL or the stream codec context.
Diffstat (limited to 'libavformat/rtpdec_amr.c')
-rw-r--r-- | libavformat/rtpdec_amr.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavformat/rtpdec_amr.c b/libavformat/rtpdec_amr.c index fd18ff22d4..86348bb0e8 100644 --- a/libavformat/rtpdec_amr.c +++ b/libavformat/rtpdec_amr.c @@ -139,7 +139,8 @@ static int amr_handle_packet(AVFormatContext *ctx, PayloadContext *data, return 0; } -static int amr_parse_fmtp(AVStream *stream, PayloadContext *data, +static int amr_parse_fmtp(AVFormatContext *s, + AVStream *stream, PayloadContext *data, char *attr, char *value) { /* Some AMR SDP configurations contain "octet-align", without @@ -147,8 +148,8 @@ static int amr_parse_fmtp(AVStream *stream, PayloadContext *data, * interpret it as "1". */ if (!strcmp(value, "")) { - av_log(NULL, AV_LOG_WARNING, "AMR fmtp attribute %s had " - "nonstandard empty value\n", attr); + av_log(s, AV_LOG_WARNING, "AMR fmtp attribute %s had " + "nonstandard empty value\n", attr); strcpy(value, "1"); } if (!strcmp(attr, "octet-align")) @@ -177,7 +178,7 @@ static int amr_parse_sdp_line(AVFormatContext *s, int st_index, * separated key/value pairs. */ if (av_strstart(line, "fmtp:", &p)) { - ret = ff_parse_fmtp(s->streams[st_index], data, p, amr_parse_fmtp); + ret = ff_parse_fmtp(s, s->streams[st_index], data, p, amr_parse_fmtp); if (!data->octet_align || data->crc || data->interleaving || data->channels != 1) { av_log(s, AV_LOG_ERROR, "Unsupported RTP/AMR configuration!\n"); |