comparison vc1.c @ 6290:b7045a85cd7d libavcodec

some const
author michael
date Fri, 01 Feb 2008 16:04:29 +0000
parents 1d735690e172
children 73a8529568bd
comparison
equal deleted inserted replaced
6289:d1cf4f790f31 6290:b7045a85cd7d
3939 /** Decode a VC1/WMV3 frame 3939 /** Decode a VC1/WMV3 frame
3940 * @todo TODO: Handle VC-1 IDUs (Transport level?) 3940 * @todo TODO: Handle VC-1 IDUs (Transport level?)
3941 */ 3941 */
3942 static int vc1_decode_frame(AVCodecContext *avctx, 3942 static int vc1_decode_frame(AVCodecContext *avctx,
3943 void *data, int *data_size, 3943 void *data, int *data_size,
3944 uint8_t *buf, int buf_size) 3944 const uint8_t *buf, int buf_size)
3945 { 3945 {
3946 VC1Context *v = avctx->priv_data; 3946 VC1Context *v = avctx->priv_data;
3947 MpegEncContext *s = &v->s; 3947 MpegEncContext *s = &v->s;
3948 AVFrame *pict = data; 3948 AVFrame *pict = data;
3949 uint8_t *buf2 = NULL; 3949 uint8_t *buf2 = NULL;
3972 if (avctx->codec_id == CODEC_ID_VC1) { 3972 if (avctx->codec_id == CODEC_ID_VC1) {
3973 int buf_size2 = 0; 3973 int buf_size2 = 0;
3974 buf2 = av_mallocz(buf_size + FF_INPUT_BUFFER_PADDING_SIZE); 3974 buf2 = av_mallocz(buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
3975 3975
3976 if(IS_MARKER(AV_RB32(buf))){ /* frame starts with marker and needs to be parsed */ 3976 if(IS_MARKER(AV_RB32(buf))){ /* frame starts with marker and needs to be parsed */
3977 uint8_t *start, *end, *next; 3977 const uint8_t *start, *end, *next;
3978 int size; 3978 int size;
3979 3979
3980 next = buf; 3980 next = buf;
3981 for(start = buf, end = buf + buf_size; next < end; start = next){ 3981 for(start = buf, end = buf + buf_size; next < end; start = next){
3982 next = find_next_marker(start + 4, end); 3982 next = find_next_marker(start + 4, end);