diff --git a/libavformat/lrcenc.c b/libavformat/lrcenc.c index cdf94e6cd2..f7a5a6982d 100644 --- a/libavformat/lrcenc.c +++ b/libavformat/lrcenc.c @@ -105,7 +105,7 @@ static int lrc_write_packet(AVFormatContext *s, AVPacket *pkt) size--; next_line++; } - if(line[0] == '[') { + if (size && line[0] == '[') { av_log(s, AV_LOG_WARNING, "Subtitle starts with '[', may cause problems with LRC format.\n"); }