summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorJULIAN GARDNER <joolzg@btinternet.com>2011-05-06 17:09:22 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-05-06 17:12:42 +0200
commit423986fc09e3c674c2c8ac273d0ef094c379b497 (patch)
tree768666351c04246a55571388ecddea4794a74284 /libavcodec/utils.c
parent95f163b33b4f13cfe650f53ee2c3746788122def (diff)
Allow encodiing empty subtitles.
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 5977d3cf16..fd1c09063f 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -678,8 +678,7 @@ 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;