| 549 | } |
| 550 | |
| 551 | int attribute_align_arg avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size, |
| 552 | const AVFrame *pict) |
| 553 | { |
| 554 | if(buf_size < FF_MIN_BUFFER_SIZE){ |
| 555 | av_log(avctx, AV_LOG_ERROR, "buffer smaller than minimum size\n"); |
| 556 | return -1; |
| 557 | } |
| 558 | if(avcodec_check_dimensions(avctx,avctx->width,avctx->height)) |
| 559 | return -1; |
| 560 | if((avctx->codec->capabilities & CODEC_CAP_DELAY) || pict){ |
| 561 | int ret = avctx->codec->encode(avctx, buf, buf_size, pict); |
| 562 | avctx->frame_number++; |
| 563 | emms_c(); //needed to avoid an emms_c() call before every return; |
| 564 | |
| 565 | return ret; |
| 566 | }else |
| 567 | return 0; |
| 568 | } |
| 569 | |
| 570 | int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, |
| 571 | const AVSubtitle *sub) |
no test coverage detected