Commit f2b6aabd authored by Clément Bœsch's avatar Clément Bœsch

lavf/srtdec: do not try to queue empty subtitle chunks.

Regression since 3af3a300.
Fixes Ticket2167.
parent 07a7145d
......@@ -100,6 +100,8 @@ static int srt_read_header(AVFormatContext *s)
pts = get_pts(&ptr, &duration, &x1, &y1, &x2, &y2);
if (pts != AV_NOPTS_VALUE) {
int len = buf.len - (ptr - buf.str);
if (len <= 0)
continue;
sub = ff_subtitles_queue_insert(&srt->q, ptr, len, 0);
if (!sub) {
res = AVERROR(ENOMEM);
......
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