avformat/lrcenc: Avoid reading packet padding

(Everything would be fine if the packet was properly padded.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-07-23 18:55:08 +02:00
parent b0ae5d02f3
commit 30c7cff399
1 changed files with 1 additions and 1 deletions

View File

@ -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");
}