comparison utils.c @ 8756:153d7e5d5a5b libavcodec

remove useless cast, it does not remove warning, encode prototype must be changed
author bcoudurier
date Sun, 08 Feb 2009 06:03:10 +0000
parents 7fd1422a8703
children d529e239a510
comparison
equal deleted inserted replaced
8755:1a6581522f9a 8756:153d7e5d5a5b
469 if(buf_size < FF_MIN_BUFFER_SIZE && 0){ 469 if(buf_size < FF_MIN_BUFFER_SIZE && 0){
470 av_log(avctx, AV_LOG_ERROR, "buffer smaller than minimum size\n"); 470 av_log(avctx, AV_LOG_ERROR, "buffer smaller than minimum size\n");
471 return -1; 471 return -1;
472 } 472 }
473 if((avctx->codec->capabilities & CODEC_CAP_DELAY) || samples){ 473 if((avctx->codec->capabilities & CODEC_CAP_DELAY) || samples){
474 int ret = avctx->codec->encode(avctx, buf, buf_size, (void *)samples); 474 int ret = avctx->codec->encode(avctx, buf, buf_size, samples);
475 avctx->frame_number++; 475 avctx->frame_number++;
476 return ret; 476 return ret;
477 }else 477 }else
478 return 0; 478 return 0;
479 } 479 }
486 return -1; 486 return -1;
487 } 487 }
488 if(avcodec_check_dimensions(avctx,avctx->width,avctx->height)) 488 if(avcodec_check_dimensions(avctx,avctx->width,avctx->height))
489 return -1; 489 return -1;
490 if((avctx->codec->capabilities & CODEC_CAP_DELAY) || pict){ 490 if((avctx->codec->capabilities & CODEC_CAP_DELAY) || pict){
491 int ret = avctx->codec->encode(avctx, buf, buf_size, (void *)pict); 491 int ret = avctx->codec->encode(avctx, buf, buf_size, pict);
492 avctx->frame_number++; 492 avctx->frame_number++;
493 emms_c(); //needed to avoid an emms_c() call before every return; 493 emms_c(); //needed to avoid an emms_c() call before every return;
494 494
495 return ret; 495 return ret;
496 }else 496 }else
499 499
500 int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, 500 int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
501 const AVSubtitle *sub) 501 const AVSubtitle *sub)
502 { 502 {
503 int ret; 503 int ret;
504 ret = avctx->codec->encode(avctx, buf, buf_size, (void *)sub); 504 ret = avctx->codec->encode(avctx, buf, buf_size, sub);
505 avctx->frame_number++; 505 avctx->frame_number++;
506 return ret; 506 return ret;
507 } 507 }
508 508
509 int attribute_align_arg avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, 509 int attribute_align_arg avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,