Commit 7d410ca0 authored by superdump's avatar superdump

Check that there are subtitle rects to encode in avcodec_encode_subtitle()

Patch by Björn Axelsson ( gecko A acc D umu D se )


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17093 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent e28e5640
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment