summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-09 23:40:09 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-09 23:40:13 +0200
commit19b9e07ef5fdd8558735538a04fac7f428df190c (patch)
tree00cb7526992d731ba21897a88188f7a41433f161 /libavformat/rtpdec_h264.c
parentf233666880afd1f2c0b9902c762df7a8733510a8 (diff)
parent0307cc2253e76772b1c645ac6117d08da87a147c (diff)
Merge commit '0307cc2253e76772b1c645ac6117d08da87a147c'
* commit '0307cc2253e76772b1c645ac6117d08da87a147c': rtpdec: pass an AVFormatContext to ff_parse_fmtp() Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpdec_h264.c')
-rw-r--r--libavformat/rtpdec_h264.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c
index 1ca78bc81c..51704aaf73 100644
--- a/libavformat/rtpdec_h264.c
+++ b/libavformat/rtpdec_h264.c
@@ -64,7 +64,8 @@ struct PayloadContext {
static const uint8_t start_sequence[] = { 0, 0, 0, 1 };
-static int sdp_parse_fmtp_config_h264(AVStream *stream,
+static int sdp_parse_fmtp_config_h264(AVFormatContext *s,
+ AVStream *stream,
PayloadContext *h264_data,
char *attr, char *value)
{
@@ -73,7 +74,7 @@ static int sdp_parse_fmtp_config_h264(AVStream *stream,
assert(h264_data != NULL);
if (!strcmp(attr, "packetization-mode")) {
- av_log(codec, AV_LOG_DEBUG, "RTP Packetization Mode: %d\n", atoi(value));
+ av_log(s, AV_LOG_DEBUG, "RTP Packetization Mode: %d\n", atoi(value));
h264_data->packetization_mode = atoi(value);
/*
* Packetization Mode:
@@ -83,7 +84,7 @@ static int sdp_parse_fmtp_config_h264(AVStream *stream,
* and 29 (FU-B) are allowed.
*/
if (h264_data->packetization_mode > 1)
- av_log(codec, AV_LOG_ERROR,
+ av_log(s, AV_LOG_ERROR,
"Interleaved RTP mode is not supported yet.\n");
} else if (!strcmp(attr, "profile-level-id")) {
if (strlen(value) == 6) {
@@ -104,7 +105,7 @@ static int sdp_parse_fmtp_config_h264(AVStream *stream,
buffer[1] = value[5];
level_idc = strtol(buffer, NULL, 16);
- av_log(codec, AV_LOG_DEBUG,
+ av_log(s, AV_LOG_DEBUG,
"RTP Profile IDC: %x Profile IOP: %x Level: %x\n",
profile_idc, profile_iop, level_idc);
h264_data->profile_idc = profile_idc;
@@ -137,7 +138,7 @@ static int sdp_parse_fmtp_config_h264(AVStream *stream,
codec->extradata_size +
FF_INPUT_BUFFER_PADDING_SIZE);
if (!dest) {
- av_log(codec, AV_LOG_ERROR,
+ av_log(s, AV_LOG_ERROR,
"Unable to allocate memory for extradata!\n");
return AVERROR(ENOMEM);
}
@@ -157,7 +158,7 @@ static int sdp_parse_fmtp_config_h264(AVStream *stream,
codec->extradata_size += sizeof(start_sequence) + packet_size;
}
}
- av_log(codec, AV_LOG_DEBUG, "Extradata set to %p (size: %d)!\n",
+ av_log(s, AV_LOG_DEBUG, "Extradata set to %p (size: %d)!\n",
codec->extradata, codec->extradata_size);
}
return 0;
@@ -385,7 +386,7 @@ static int parse_h264_sdp_line(AVFormatContext *s, int st_index,
codec->width = atoi(buf1);
codec->height = atoi(p + 1); // skip the -
} else if (av_strstart(p, "fmtp:", &p)) {
- return ff_parse_fmtp(stream, h264_data, p, sdp_parse_fmtp_config_h264);
+ return ff_parse_fmtp(s, stream, h264_data, p, sdp_parse_fmtp_config_h264);
} else if (av_strstart(p, "cliprect:", &p)) {
// could use this if we wanted.
}