Browse Source

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>
tags/n2.6
Michael Niedermayer 11 years ago
parent
commit
ad2deb02e5
8 changed files with 8 additions and 8 deletions
  1. +1
    -1
      libavcodec/vorbis_parser.c
  2. +1
    -1
      libavcodec/vorbisdec.c
  3. +1
    -1
      libavcodec/vp3.c
  4. +1
    -1
      libavcodec/xiph.c
  5. +1
    -1
      libavcodec/xiph.h
  6. +1
    -1
      libavformat/matroskaenc.c
  7. +1
    -1
      libavformat/oggenc.c
  8. +1
    -1
      libavformat/sdp.c

+ 1
- 1
libavcodec/vorbis_parser.c View File

@@ -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;



+ 1
- 1
libavcodec/vorbisdec.c View File

@@ -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;


+ 1
- 1
libavcodec/vp3.c View File

@@ -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;



+ 1
- 1
libavcodec/xiph.c View File

@@ -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;


+ 1
- 1
libavcodec/xiph.h View File

@@ -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 */

+ 1
- 1
libavformat/matroskaenc.c View File

@@ -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;


+ 1
- 1
libavformat/oggenc.c View File

@@ -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;


+ 1
- 1
libavformat/sdp.c View File

@@ -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;



Loading…
Cancel
Save