Mercurial > libavcodec.hg
comparison h263dec.c @ 4931:0d1cc37d9430 libavcodec
make some parser parameters const to avoid casting const to non-const
author | aurel |
---|---|
date | Mon, 07 May 2007 00:47:03 +0000 |
parents | 5bcb6208ac58 |
children | ee6c1ce06470 |
comparison
equal
deleted
inserted
replaced
4930:655d25351bfc | 4931:0d1cc37d9430 |
---|---|
394 } | 394 } |
395 | 395 |
396 #ifdef CONFIG_H263_PARSER | 396 #ifdef CONFIG_H263_PARSER |
397 static int h263_parse(AVCodecParserContext *s, | 397 static int h263_parse(AVCodecParserContext *s, |
398 AVCodecContext *avctx, | 398 AVCodecContext *avctx, |
399 uint8_t **poutbuf, int *poutbuf_size, | 399 const uint8_t **poutbuf, int *poutbuf_size, |
400 const uint8_t *buf, int buf_size) | 400 const uint8_t *buf, int buf_size) |
401 { | 401 { |
402 ParseContext *pc = s->priv_data; | 402 ParseContext *pc = s->priv_data; |
403 int next; | 403 int next; |
404 | 404 |
405 next= h263_find_frame_end(pc, buf, buf_size); | 405 next= h263_find_frame_end(pc, buf, buf_size); |
406 | 406 |
407 if (ff_combine_frame(pc, next, (uint8_t **)&buf, &buf_size) < 0) { | 407 if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { |
408 *poutbuf = NULL; | 408 *poutbuf = NULL; |
409 *poutbuf_size = 0; | 409 *poutbuf_size = 0; |
410 return buf_size; | 410 return buf_size; |
411 } | 411 } |
412 | 412 |
413 *poutbuf = (uint8_t *)buf; | 413 *poutbuf = buf; |
414 *poutbuf_size = buf_size; | 414 *poutbuf_size = buf_size; |
415 return next; | 415 return next; |
416 } | 416 } |
417 #endif | 417 #endif |
418 | 418 |
458 }else{ | 458 }else{ |
459 av_log(s->avctx, AV_LOG_ERROR, "this codec does not support truncated bitstreams\n"); | 459 av_log(s->avctx, AV_LOG_ERROR, "this codec does not support truncated bitstreams\n"); |
460 return -1; | 460 return -1; |
461 } | 461 } |
462 | 462 |
463 if( ff_combine_frame(&s->parse_context, next, &buf, &buf_size) < 0 ) | 463 if( ff_combine_frame(&s->parse_context, next, (const uint8_t **)&buf, &buf_size) < 0 ) |
464 return buf_size; | 464 return buf_size; |
465 } | 465 } |
466 | 466 |
467 | 467 |
468 retry: | 468 retry: |