diff --git a/libavformat/srtenc.c b/libavformat/srtenc.c index f50cfbb127..833823839b 100644 --- a/libavformat/srtenc.c +++ b/libavformat/srtenc.c @@ -65,7 +65,7 @@ static int srt_write_packet(AVFormatContext *avf, AVPacket *pkt) if (d <= 0) /* For backward compatibility, fallback to convergence_duration. */ d = pkt->convergence_duration; - if (s == AV_NOPTS_VALUE || d <= 0) { + if (s == AV_NOPTS_VALUE || d < 0) { av_log(avf, AV_LOG_ERROR, "Insufficient timestamps.\n"); return AVERROR(EINVAL); }