| 568 | } |
| 569 | |
| 570 | int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, |
| 571 | const AVSubtitle *sub) |
| 572 | { |
| 573 | int ret; |
| 574 | if(sub->start_display_time) { |
| 575 | av_log(avctx, AV_LOG_ERROR, "start_display_time must be 0.\n"); |
| 576 | return -1; |
| 577 | } |
| 578 | if(sub->num_rects == 0 || !sub->rects) |
| 579 | return -1; |
| 580 | ret = avctx->codec->encode(avctx, buf, buf_size, sub); |
| 581 | avctx->frame_number++; |
| 582 | return ret; |
| 583 | } |
| 584 | |
| 585 | #if LIBAVCODEC_VERSION_MAJOR < 53 |
| 586 | int attribute_align_arg avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, |
no test coverage detected