Commit d2a5c6f2 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'ec96a89c'

* commit 'ec96a89c':
  rtpdec: Don't pass non-const pointers to fmtp attribute parsing functions
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 499da717 ec96a89c
...@@ -852,7 +852,7 @@ int ff_parse_fmtp(AVFormatContext *s, ...@@ -852,7 +852,7 @@ int ff_parse_fmtp(AVFormatContext *s,
int (*parse_fmtp)(AVFormatContext *s, int (*parse_fmtp)(AVFormatContext *s,
AVStream *stream, AVStream *stream,
PayloadContext *data, PayloadContext *data,
char *attr, char *value)) const char *attr, const char *value))
{ {
char attr[256]; char attr[256];
char *value; char *value;
......
...@@ -207,7 +207,7 @@ int ff_parse_fmtp(AVFormatContext *s, ...@@ -207,7 +207,7 @@ int ff_parse_fmtp(AVFormatContext *s,
int (*parse_fmtp)(AVFormatContext *s, int (*parse_fmtp)(AVFormatContext *s,
AVStream *stream, AVStream *stream,
PayloadContext *data, PayloadContext *data,
char *attr, char *value)); const char *attr, const char *value));
void ff_register_rtp_dynamic_payload_handlers(void); void ff_register_rtp_dynamic_payload_handlers(void);
......
...@@ -137,7 +137,7 @@ static int amr_handle_packet(AVFormatContext *ctx, PayloadContext *data, ...@@ -137,7 +137,7 @@ static int amr_handle_packet(AVFormatContext *ctx, PayloadContext *data,
static int amr_parse_fmtp(AVFormatContext *s, static int amr_parse_fmtp(AVFormatContext *s,
AVStream *stream, PayloadContext *data, AVStream *stream, PayloadContext *data,
char *attr, char *value) const char *attr, const char *value)
{ {
/* Some AMR SDP configurations contain "octet-align", without /* Some AMR SDP configurations contain "octet-align", without
* the trailing =1. Therefore, if the value is empty, * the trailing =1. Therefore, if the value is empty,
...@@ -146,7 +146,7 @@ static int amr_parse_fmtp(AVFormatContext *s, ...@@ -146,7 +146,7 @@ static int amr_parse_fmtp(AVFormatContext *s,
if (!strcmp(value, "")) { if (!strcmp(value, "")) {
av_log(s, AV_LOG_WARNING, "AMR fmtp attribute %s had " av_log(s, AV_LOG_WARNING, "AMR fmtp attribute %s had "
"nonstandard empty value\n", attr); "nonstandard empty value\n", attr);
strcpy(value, "1"); value = "1";
} }
if (!strcmp(attr, "octet-align")) if (!strcmp(attr, "octet-align"))
data->octet_align = atoi(value); data->octet_align = atoi(value);
......
...@@ -48,7 +48,7 @@ static av_cold void dv_free_context(PayloadContext *data) ...@@ -48,7 +48,7 @@ static av_cold void dv_free_context(PayloadContext *data)
static av_cold int dv_sdp_parse_fmtp_config(AVFormatContext *s, static av_cold int dv_sdp_parse_fmtp_config(AVFormatContext *s,
AVStream *stream, AVStream *stream,
PayloadContext *dv_data, PayloadContext *dv_data,
char *attr, char *value) const char *attr, const char *value)
{ {
/* does the DV stream include audio? */ /* does the DV stream include audio? */
if (!strcmp(attr, "audio") && !strcmp(value, "bundled")) if (!strcmp(attr, "audio") && !strcmp(value, "bundled"))
......
...@@ -144,7 +144,7 @@ int ff_h264_parse_sprop_parameter_sets(AVFormatContext *s, ...@@ -144,7 +144,7 @@ int ff_h264_parse_sprop_parameter_sets(AVFormatContext *s,
static int sdp_parse_fmtp_config_h264(AVFormatContext *s, static int sdp_parse_fmtp_config_h264(AVFormatContext *s,
AVStream *stream, AVStream *stream,
PayloadContext *h264_data, PayloadContext *h264_data,
char *attr, char *value) const char *attr, const char *value)
{ {
AVCodecContext *codec = stream->codec; AVCodecContext *codec = stream->codec;
......
...@@ -49,7 +49,7 @@ static const uint8_t start_sequence[] = { 0x00, 0x00, 0x00, 0x01 }; ...@@ -49,7 +49,7 @@ static const uint8_t start_sequence[] = { 0x00, 0x00, 0x00, 0x01 };
static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s, static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s,
AVStream *stream, AVStream *stream,
PayloadContext *hevc_data, PayloadContext *hevc_data,
char *attr, char *value) const char *attr, const char *value)
{ {
/* profile-space: 0-3 */ /* profile-space: 0-3 */
/* profile-id: 0-31 */ /* profile-id: 0-31 */
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
static int ilbc_parse_fmtp(AVFormatContext *s, static int ilbc_parse_fmtp(AVFormatContext *s,
AVStream *stream, PayloadContext *data, AVStream *stream, PayloadContext *data,
char *attr, char *value) const char *attr, const char *value)
{ {
if (!strcmp(attr, "mode")) { if (!strcmp(attr, "mode")) {
int mode = atoi(value); int mode = atoi(value);
......
...@@ -137,7 +137,7 @@ end: ...@@ -137,7 +137,7 @@ end:
static int parse_fmtp(AVFormatContext *s, static int parse_fmtp(AVFormatContext *s,
AVStream *stream, PayloadContext *data, AVStream *stream, PayloadContext *data,
char *attr, char *value) const char *attr, const char *value)
{ {
int res; int res;
......
...@@ -273,7 +273,7 @@ static int aac_parse_packet(AVFormatContext *ctx, PayloadContext *data, ...@@ -273,7 +273,7 @@ static int aac_parse_packet(AVFormatContext *ctx, PayloadContext *data,
static int parse_fmtp(AVFormatContext *s, static int parse_fmtp(AVFormatContext *s,
AVStream *stream, PayloadContext *data, AVStream *stream, PayloadContext *data,
char *attr, char *value) const char *attr, const char *value)
{ {
AVCodecContext *codec = stream->codec; AVCodecContext *codec = stream->codec;
int res, i; int res, i;
......
...@@ -295,7 +295,7 @@ parse_packed_headers(const uint8_t * packed_headers, ...@@ -295,7 +295,7 @@ parse_packed_headers(const uint8_t * packed_headers,
static int xiph_parse_fmtp_pair(AVFormatContext *s, static int xiph_parse_fmtp_pair(AVFormatContext *s,
AVStream* stream, AVStream* stream,
PayloadContext *xiph_data, PayloadContext *xiph_data,
char *attr, char *value) const char *attr, const char *value)
{ {
AVCodecContext *codec = stream->codec; AVCodecContext *codec = stream->codec;
int result = 0; int result = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment