[FFmpeg-cvslog] Allow encodiing empty subtitles.

JULIAN GARDNER git at videolan.org
Sat May 7 00:07:17 CEST 2011


ffmpeg | branch: master | JULIAN GARDNER <joolzg at btinternet.com> | Fri May  6 17:09:22 2011 +0200| [423986fc09e3c674c2c8ac273d0ef094c379b497] | committer: Michael Niedermayer

Allow encodiing empty subtitles.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=423986fc09e3c674c2c8ac273d0ef094c379b497
---

 libavcodec/utils.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 5977d3c..fd1c090 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;



More information about the ffmpeg-cvslog mailing list