summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-12 14:46:19 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-14 14:30:45 +0100
commitad2deb02e5d8bfd67c99c6409cd1d0992984fdc7 (patch)
tree688fa16930758dbcac30b75829a1d3a6450eb37c
parent3b537eab27bb34f5f63b06097fbd52ff5941c3f6 (diff)
downloadffmpeg-ad2deb02e5d8bfd67c99c6409cd1d0992984fdc7.tar.gz
avcodec/xiph: mark returned header pointers const from avpriv_split_xiph_headers()
Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/vorbis_parser.c2
-rw-r--r--libavcodec/vorbisdec.c2
-rw-r--r--libavcodec/vp3.c2
-rw-r--r--libavcodec/xiph.c2
-rw-r--r--libavcodec/xiph.h2
-rw-r--r--libavformat/matroskaenc.c2
-rw-r--r--libavformat/oggenc.c2
-rw-r--r--libavformat/sdp.c2
8 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/vorbis_parser.c b/libavcodec/vorbis_parser.c
index b99f115598..547fd47098 100644
--- a/libavcodec/vorbis_parser.c
+++ b/libavcodec/vorbis_parser.c
@@ -184,7 +184,7 @@ bad_header:
static int vorbis_parse_init(AVVorbisParseContext *s,
const uint8_t *extradata, int extradata_size)
{
- uint8_t *header_start[3];
+ const uint8_t *header_start[3];
int header_len[3];
int ret;
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index fb1609920d..09a863f277 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -1017,7 +1017,7 @@ static av_cold int vorbis_decode_init(AVCodecContext *avctx)
vorbis_context *vc = avctx->priv_data;
uint8_t *headers = avctx->extradata;
int headers_len = avctx->extradata_size;
- uint8_t *header_start[3];
+ const uint8_t *header_start[3];
int header_len[3];
GetBitContext *gb = &vc->gb;
int hdr_type, ret;
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 8aca83ae09..0e37f0de7a 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -2437,7 +2437,7 @@ static av_cold int theora_decode_init(AVCodecContext *avctx)
Vp3DecodeContext *s = avctx->priv_data;
GetBitContext gb;
int ptype;
- uint8_t *header_start[3];
+ const uint8_t *header_start[3];
int header_len[3];
int i;
diff --git a/libavcodec/xiph.c b/libavcodec/xiph.c
index 49b978dd8f..d072224b4a 100644
--- a/libavcodec/xiph.c
+++ b/libavcodec/xiph.c
@@ -22,7 +22,7 @@
#include "xiph.h"
int avpriv_split_xiph_headers(const uint8_t *extradata, int extradata_size,
- int first_header_size, uint8_t *header_start[3],
+ int first_header_size, const uint8_t *header_start[3],
int header_len[3])
{
int i;
diff --git a/libavcodec/xiph.h b/libavcodec/xiph.h
index b8ddbbe994..1741a51b65 100644
--- a/libavcodec/xiph.h
+++ b/libavcodec/xiph.h
@@ -37,7 +37,7 @@
* @return On error a negative value is returned, on success zero.
*/
int avpriv_split_xiph_headers(const uint8_t *extradata, int extradata_size,
- int first_header_size, uint8_t *header_start[3],
+ int first_header_size, const uint8_t *header_start[3],
int header_len[3]);
#endif /* AVCODEC_XIPH_H */
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index e8e8da043f..c781c8aa0f 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -491,7 +491,7 @@ static int64_t mkv_write_cues(AVFormatContext *s, mkv_cues *cues, mkv_track *tra
static int put_xiph_codecpriv(AVFormatContext *s, AVIOContext *pb, AVCodecContext *codec)
{
- uint8_t *header_start[3];
+ const uint8_t *header_start[3];
int header_len[3];
int first_header_size;
int j;
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index f3413c54c9..3929311b49 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -508,7 +508,7 @@ static int ogg_write_header(AVFormatContext *s)
if (avpriv_split_xiph_headers(st->codec->extradata, st->codec->extradata_size,
st->codec->codec_id == AV_CODEC_ID_VORBIS ? 30 : 42,
- oggstream->header, oggstream->header_len) < 0) {
+ (const uint8_t**)oggstream->header, oggstream->header_len) < 0) {
av_log(s, AV_LOG_ERROR, "Extradata corrupted\n");
av_freep(&st->priv_data);
return AVERROR_INVALIDDATA;
diff --git a/libavformat/sdp.c b/libavformat/sdp.c
index 5bf9de6f84..fadabbe5ae 100644
--- a/libavformat/sdp.c
+++ b/libavformat/sdp.c
@@ -348,7 +348,7 @@ static char *extradata2config(AVCodecContext *c)
static char *xiph_extradata2config(AVCodecContext *c)
{
char *config, *encoded_config;
- uint8_t *header_start[3];
+ const uint8_t *header_start[3];
int headers_len, header_len[3], config_len;
int first_header_size;