mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-01 09:27:44 +00:00
Check that there are subtitle rects to encode in avcodec_encode_subtitle()
Patch by Björn Axelsson ( gecko A acc D umu D se ) Originally committed as revision 17093 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
9413db9e04
commit
505aa6c91d
1 changed files with 2 additions and 0 deletions
|
@ -505,6 +505,8 @@ int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
|
|||
av_log(avctx, AV_LOG_ERROR, "start_display_time must be 0.\n");
|
||||
return -1;
|
||||
}
|
||||
if(sub->num_rects == 0 || !sub->rects)
|
||||
return -1;
|
||||
ret = avctx->codec->encode(avctx, buf, buf_size, sub);
|
||||
avctx->frame_number++;
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue