[FFmpeg-cvslog] r11823 - in trunk/libavcodec: avcodec.h utils.c
michael
subversion
Sat Feb 2 23:54:51 CET 2008
Author: michael
Date: Sat Feb 2 23:54:50 2008
New Revision: 11823
Log:
Make avcodec_decode_* functions take const input buffers.
Modified:
trunk/libavcodec/avcodec.h
trunk/libavcodec/utils.c
Modified: trunk/libavcodec/avcodec.h
==============================================================================
--- trunk/libavcodec/avcodec.h (original)
+++ trunk/libavcodec/avcodec.h Sat Feb 2 23:54:50 2008
@@ -2611,7 +2611,7 @@ int avcodec_open(AVCodecContext *avctx,
*/
attribute_deprecated int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples,
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.
@@ -2651,7 +2651,7 @@ attribute_deprecated int avcodec_decode_
*/
int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
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.
@@ -2686,7 +2686,7 @@ int avcodec_decode_audio2(AVCodecContext
*/
int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,
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
* number of bytes used. If no subtitle could be decompressed,
Modified: trunk/libavcodec/utils.c
==============================================================================
--- trunk/libavcodec/utils.c (original)
+++ trunk/libavcodec/utils.c Sat Feb 2 23:54:50 2008
@@ -934,7 +934,7 @@ int avcodec_encode_subtitle(AVCodecConte
int attribute_align_arg avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,
int *got_picture_ptr,
- uint8_t *buf, int buf_size)
+ const uint8_t *buf, int buf_size)
{
int ret;
@@ -957,7 +957,7 @@ int attribute_align_arg avcodec_decode_v
int attribute_align_arg avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
int *frame_size_ptr,
- uint8_t *buf, int buf_size)
+ const uint8_t *buf, int buf_size)
{
int ret;
@@ -986,7 +986,7 @@ int attribute_align_arg avcodec_decode_a
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples,
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;
return avcodec_decode_audio2(avctx, samples, frame_size_ptr, buf, buf_size);
}
More information about the ffmpeg-cvslog
mailing list