Commit 3820a2e6 authored by michael's avatar michael

Make avcodec_decode_* functions take const input buffers.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11823 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent dee935fb
...@@ -2611,7 +2611,7 @@ int avcodec_open(AVCodecContext *avctx, AVCodec *codec); ...@@ -2611,7 +2611,7 @@ int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
*/ */
attribute_deprecated int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples, attribute_deprecated int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples,
int *frame_size_ptr, int *frame_size_ptr,
uint8_t *buf, int buf_size); const uint8_t *buf, int buf_size);
/** /**
* Decodes an audio frame from \p buf into \p samples. * Decodes an audio frame from \p buf into \p samples.
...@@ -2651,7 +2651,7 @@ attribute_deprecated int avcodec_decode_audio(AVCodecContext *avctx, int16_t *sa ...@@ -2651,7 +2651,7 @@ attribute_deprecated int avcodec_decode_audio(AVCodecContext *avctx, int16_t *sa
*/ */
int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples, int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
int *frame_size_ptr, int *frame_size_ptr,
uint8_t *buf, int buf_size); const uint8_t *buf, int buf_size);
/** /**
* Decodes a video frame from \p buf into \p picture. * Decodes a video frame from \p buf into \p picture.
...@@ -2686,7 +2686,7 @@ int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples, ...@@ -2686,7 +2686,7 @@ int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
*/ */
int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,
int *got_picture_ptr, int *got_picture_ptr,
uint8_t *buf, int buf_size); const uint8_t *buf, int buf_size);
/* Decode a subtitle message. Return -1 if error, otherwise return the /* Decode a subtitle message. Return -1 if error, otherwise return the
* number of bytes used. If no subtitle could be decompressed, * number of bytes used. If no subtitle could be decompressed,
......
...@@ -934,7 +934,7 @@ int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, ...@@ -934,7 +934,7 @@ int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
int attribute_align_arg avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, int attribute_align_arg avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,
int *got_picture_ptr, int *got_picture_ptr,
uint8_t *buf, int buf_size) const uint8_t *buf, int buf_size)
{ {
int ret; int ret;
...@@ -957,7 +957,7 @@ int attribute_align_arg avcodec_decode_video(AVCodecContext *avctx, AVFrame *pic ...@@ -957,7 +957,7 @@ int attribute_align_arg avcodec_decode_video(AVCodecContext *avctx, AVFrame *pic
int attribute_align_arg avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples, int attribute_align_arg avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
int *frame_size_ptr, int *frame_size_ptr,
uint8_t *buf, int buf_size) const uint8_t *buf, int buf_size)
{ {
int ret; int ret;
...@@ -986,7 +986,7 @@ int attribute_align_arg avcodec_decode_audio2(AVCodecContext *avctx, int16_t *sa ...@@ -986,7 +986,7 @@ int attribute_align_arg avcodec_decode_audio2(AVCodecContext *avctx, int16_t *sa
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples, int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples,
int *frame_size_ptr, int *frame_size_ptr,
uint8_t *buf, int buf_size){ const uint8_t *buf, int buf_size){
*frame_size_ptr= AVCODEC_MAX_AUDIO_FRAME_SIZE; *frame_size_ptr= AVCODEC_MAX_AUDIO_FRAME_SIZE;
return avcodec_decode_audio2(avctx, samples, frame_size_ptr, buf, buf_size); return avcodec_decode_audio2(avctx, samples, frame_size_ptr, buf, buf_size);
} }
......
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